]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpenc.c
Merge commit 'c11c693accaad65d3f4afa44c27f2338a2e3bf8f'
[ffmpeg] / libavformat / rtpenc.c
index f477650a877e6c7f2d9ad5e6eadfbf11aec83004..db1ec81219dbfe969a2541424a3b7a6c44bf25a8 100644 (file)
@@ -75,6 +75,7 @@ static int is_supported(enum AVCodecID id)
     case AV_CODEC_ID_VORBIS:
     case AV_CODEC_ID_THEORA:
     case AV_CODEC_ID_VP8:
+    case AV_CODEC_ID_VP9:
     case AV_CODEC_ID_ADPCM_G722:
     case AV_CODEC_ID_ADPCM_G726:
     case AV_CODEC_ID_ILBC:
@@ -211,6 +212,16 @@ static int rtp_write_header(AVFormatContext *s1)
             s->nal_length_size = (st->codecpar->extradata[21] & 0x03) + 1;
         }
         break;
+    case AV_CODEC_ID_VP9:
+        if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+            av_log(s, AV_LOG_ERROR,
+                   "Packetizing VP9 is experimental and its specification is "
+                   "still in draft state. "
+                   "Please set -strict experimental in order to enable it.\n");
+            ret = AVERROR_EXPERIMENTAL;
+            goto fail;
+        }
+        break;
     case AV_CODEC_ID_VORBIS:
     case AV_CODEC_ID_THEORA:
         s->max_frames_per_packet = 15;
@@ -594,6 +605,9 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
     case AV_CODEC_ID_VP8:
         ff_rtp_send_vp8(s1, pkt->data, size);
         break;
+    case AV_CODEC_ID_VP9:
+        ff_rtp_send_vp9(s1, pkt->data, size);
+        break;
     case AV_CODEC_ID_ILBC:
         rtp_send_ilbc(s1, pkt->data, size);
         break;