]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_svq3.c
rtpdec_vp9: Update header parsing to spec draft 02
[ffmpeg] / libavformat / rtpdec_svq3.c
index 004696fa544cf922e521d40291951c2bba2b1fb3..267d9dbcfeea5b7e6d99cad3a72276fcaa0a388f 100644 (file)
@@ -58,24 +58,24 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv,
 
     if (config_packet) {
 
-        av_freep(&st->codec->extradata);
-        st->codec->extradata_size = 0;
+        av_freep(&st->codecpar->extradata);
+        st->codecpar->extradata_size = 0;
 
-        if (len < 2 || !(st->codec->extradata =
+        if (len < 2 || !(st->codecpar->extradata =
                          av_malloc(len + 8 + AV_INPUT_BUFFER_PADDING_SIZE)))
             return AVERROR_INVALIDDATA;
 
-        st->codec->extradata_size = len + 8;
-        memcpy(st->codec->extradata, "SEQH", 4);
-        AV_WB32(st->codec->extradata + 4, len);
-        memcpy(st->codec->extradata + 8, buf, len);
+        st->codecpar->extradata_size = len + 8;
+        memcpy(st->codecpar->extradata, "SEQH", 4);
+        AV_WB32(st->codecpar->extradata + 4, len);
+        memcpy(st->codecpar->extradata + 8, buf, len);
 
         /* We set codec_id to AV_CODEC_ID_NONE initially to
          * delay decoder initialization since extradata is
          * carried within the RTP stream, not SDP. Here,
          * by setting codec_id to AV_CODEC_ID_SVQ3, we are signalling
          * to the decoder that it is OK to initialize. */
-        st->codec->codec_id = AV_CODEC_ID_SVQ3;
+        st->codecpar->codec_id = AV_CODEC_ID_SVQ3;
 
         return AVERROR(EAGAIN);
     }