aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ipmovie.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 20:58:15 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 20:59:55 +0100
commit6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch)
tree0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/ipmovie.c
parent60b75186b2c878b6257b43c8fcc0b1356ada218e (diff)
parent9200514ad8717c63f82101dc394f4378854325bf (diff)
downloadffmpeg-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/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index bc5d8ccb62..bb34aae749 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -221,19 +221,19 @@ static int init_audio(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
ipmovie->audio_stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = ipmovie->audio_type;
- st->codec->codec_tag = 0; /* no tag */
- st->codec->channels = ipmovie->audio_channels;
- st->codec->channel_layout = st->codec->channels == 1 ? AV_CH_LAYOUT_MONO :
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = ipmovie->audio_type;
+ st->codecpar->codec_tag = 0; /* no tag */
+ st->codecpar->channels = ipmovie->audio_channels;
+ st->codecpar->channel_layout = st->codecpar->channels == 1 ? AV_CH_LAYOUT_MONO :
AV_CH_LAYOUT_STEREO;
- st->codec->sample_rate = ipmovie->audio_sample_rate;
- st->codec->bits_per_coded_sample = ipmovie->audio_bits;
- st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
- st->codec->bits_per_coded_sample;
- if (st->codec->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
- st->codec->bit_rate /= 2;
- st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
+ st->codecpar->sample_rate = ipmovie->audio_sample_rate;
+ st->codecpar->bits_per_coded_sample = ipmovie->audio_bits;
+ st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *
+ st->codecpar->bits_per_coded_sample;
+ if (st->codecpar->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
+ st->codecpar->bit_rate /= 2;
+ st->codecpar->block_align = st->codecpar->channels * st->codecpar->bits_per_coded_sample;
return 0;
}
@@ -623,12 +623,12 @@ static int ipmovie_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 63, 1, 1000000);
ipmovie->video_stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = AV_CODEC_ID_INTERPLAY_VIDEO;
- st->codec->codec_tag = 0; /* no fourcc */
- st->codec->width = ipmovie->video_width;
- st->codec->height = ipmovie->video_height;
- st->codec->bits_per_coded_sample = ipmovie->video_bpp;
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_INTERPLAY_VIDEO;
+ st->codecpar->codec_tag = 0; /* no fourcc */
+ st->codecpar->width = ipmovie->video_width;
+ st->codecpar->height = ipmovie->video_height;
+ st->codecpar->bits_per_coded_sample = ipmovie->video_bpp;
if (ipmovie->audio_type) {
return init_audio(s);