diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 20:58:15 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 20:59:55 +0100 |
commit | 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch) | |
tree | 0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/rtpdec_qdm2.c | |
parent | 60b75186b2c878b6257b43c8fcc0b1356ada218e (diff) | |
parent | 9200514ad8717c63f82101dc394f4378854325bf (diff) | |
download | ffmpeg-6f69f7a8bf6a0d013985578df2ef42ee6b1c7994.tar.gz |
Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
lavf: replace AVStream.codec with AVStream.codecpar
This has been a HUGE effort from:
- Derek Buitenhuis <derek.buitenhuis@gmail.com>
- Hendrik Leppkes <h.leppkes@gmail.com>
- wm4 <nfxjfg@googlemail.com>
- Clément Bœsch <clement@stupeflix.com>
- James Almer <jamrial@gmail.com>
- Michael Niedermayer <michael@niedermayer.cc>
- Rostislav Pehlivanov <atomnuker@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_qdm2.c')
-rw-r--r-- | libavformat/rtpdec_qdm2.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/rtpdec_qdm2.c b/libavformat/rtpdec_qdm2.c index 22b419e7e0..1f4fd5aace 100644 --- a/libavformat/rtpdec_qdm2.c +++ b/libavformat/rtpdec_qdm2.c @@ -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 */ |