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/4xm.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/4xm.c')
-rw-r--r-- | libavformat/4xm.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 70f0def3ed..2f2f6a6afc 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -108,16 +108,16 @@ static int parse_vtrk(AVFormatContext *s, fourxm->video_stream_index = st->index; - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = AV_CODEC_ID_4XM; + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; + st->codecpar->codec_id = AV_CODEC_ID_4XM; - st->codec->extradata = av_mallocz(4 + AV_INPUT_BUFFER_PADDING_SIZE); - if (!st->codec->extradata) + st->codecpar->extradata = av_mallocz(4 + AV_INPUT_BUFFER_PADDING_SIZE); + if (!st->codecpar->extradata) return AVERROR(ENOMEM); - st->codec->extradata_size = 4; - AV_WL32(st->codec->extradata, AV_RL32(buf + 16)); - st->codec->width = AV_RL32(buf + 36); - st->codec->height = AV_RL32(buf + 40); + st->codecpar->extradata_size = 4; + AV_WL32(st->codecpar->extradata, AV_RL32(buf + 16)); + st->codecpar->width = AV_RL32(buf + 36); + st->codecpar->height = AV_RL32(buf + 40); return 0; } @@ -173,23 +173,23 @@ static int parse_strk(AVFormatContext *s, fourxm->tracks[track].stream_index = st->index; - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_tag = 0; - st->codec->channels = fourxm->tracks[track].channels; - st->codec->sample_rate = fourxm->tracks[track].sample_rate; - st->codec->bits_per_coded_sample = fourxm->tracks[track].bits; - st->codec->bit_rate = st->codec->channels * - st->codec->sample_rate * - st->codec->bits_per_coded_sample; - st->codec->block_align = st->codec->channels * - st->codec->bits_per_coded_sample; + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + st->codecpar->codec_tag = 0; + st->codecpar->channels = fourxm->tracks[track].channels; + st->codecpar->sample_rate = fourxm->tracks[track].sample_rate; + st->codecpar->bits_per_coded_sample = fourxm->tracks[track].bits; + st->codecpar->bit_rate = st->codecpar->channels * + st->codecpar->sample_rate * + st->codecpar->bits_per_coded_sample; + st->codecpar->block_align = st->codecpar->channels * + st->codecpar->bits_per_coded_sample; if (fourxm->tracks[track].adpcm){ - st->codec->codec_id = AV_CODEC_ID_ADPCM_4XM; - } else if (st->codec->bits_per_coded_sample == 8) { - st->codec->codec_id = AV_CODEC_ID_PCM_U8; + st->codecpar->codec_id = AV_CODEC_ID_ADPCM_4XM; + } else if (st->codecpar->bits_per_coded_sample == 8) { + st->codecpar->codec_id = AV_CODEC_ID_PCM_U8; } else - st->codec->codec_id = AV_CODEC_ID_PCM_S16LE; + st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; return 0; } |