diff options
Diffstat (limited to 'libavformat/rtpdec_qdm2.c')
-rw-r--r-- | libavformat/rtpdec_qdm2.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/rtpdec_qdm2.c b/libavformat/rtpdec_qdm2.c index 16dd48920e..9a77a705bf 100644 --- a/libavformat/rtpdec_qdm2.c +++ b/libavformat/rtpdec_qdm2.c @@ -102,20 +102,20 @@ 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); - st->codec->extradata_size = 26 + item_len; - if (!(st->codec->extradata = av_mallocz(st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE))) { - st->codec->extradata_size = 0; + av_freep(&st->codecpar->extradata); + st->codecpar->extradata_size = 26 + item_len; + if (!(st->codecpar->extradata = av_mallocz(st->codecpar->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE))) { + st->codecpar->extradata_size = 0; 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 */ |