]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_qdm2.c
Merge commit '39a2d3288e82e4e576c03efb32179ef5a19fff50'
[ffmpeg] / libavformat / rtpdec_qdm2.c
index 22b419e7e0a634a991207a4e4f8de204a3e0e1a2..1f4fd5aace5e60a62dce91ddb8b204d4acd18c1a 100644 (file)
@@ -104,18 +104,18 @@ static int qdm2_parse_config(PayloadContext *qdm, AVStream *st,
             case 4: /* stream with extradata */
                 if (item_len < 30)
                     return AVERROR_INVALIDDATA;
-                av_freep(&st->codec->extradata);
-                if (ff_alloc_extradata(st->codec, 26 + item_len)) {
+                av_freep(&st->codecpar->extradata);
+                if (ff_alloc_extradata(st->codecpar, 26 + item_len)) {
                     return AVERROR(ENOMEM);
                 }
-                AV_WB32(st->codec->extradata, 12);
-                memcpy(st->codec->extradata + 4, "frma", 4);
-                memcpy(st->codec->extradata + 8, "QDM2", 4);
-                AV_WB32(st->codec->extradata + 12, 6 + item_len);
-                memcpy(st->codec->extradata + 16, "QDCA", 4);
-                memcpy(st->codec->extradata + 20, p + 2, item_len - 2);
-                AV_WB32(st->codec->extradata + 18 + item_len, 8);
-                AV_WB32(st->codec->extradata + 22 + item_len, 0);
+                AV_WB32(st->codecpar->extradata, 12);
+                memcpy(st->codecpar->extradata + 4, "frma", 4);
+                memcpy(st->codecpar->extradata + 8, "QDM2", 4);
+                AV_WB32(st->codecpar->extradata + 12, 6 + item_len);
+                memcpy(st->codecpar->extradata + 16, "QDCA", 4);
+                memcpy(st->codecpar->extradata + 20, p + 2, item_len - 2);
+                AV_WB32(st->codecpar->extradata + 18 + item_len, 8);
+                AV_WB32(st->codecpar->extradata + 22 + item_len, 0);
 
                 qdm->block_size = AV_RB32(p + 26);
                 break;
@@ -265,9 +265,9 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
              * carried within the RTP stream, not SDP. Here,
              * by setting codec_id to AV_CODEC_ID_QDM2, we are signalling
              * to the decoder that it is OK to initialize. */
-            st->codec->codec_id = AV_CODEC_ID_QDM2;
+            st->codecpar->codec_id = AV_CODEC_ID_QDM2;
         }
-        if (st->codec->codec_id == AV_CODEC_ID_NONE)
+        if (st->codecpar->codec_id == AV_CODEC_ID_NONE)
             return AVERROR(EAGAIN);
 
         /* subpackets */