summaryrefslogtreecommitdiff
path: root/libavformat/segafilm.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/segafilm.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/segafilm.c')
-rw-r--r--libavformat/segafilm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 94b377215e..6ee2bd435e 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -150,15 +150,15 @@ static int film_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
film->video_stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = film->video_type;
- st->codec->codec_tag = 0; /* no fourcc */
- st->codec->width = AV_RB32(&scratch[16]);
- st->codec->height = AV_RB32(&scratch[12]);
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = film->video_type;
+ st->codecpar->codec_tag = 0; /* no fourcc */
+ st->codecpar->width = AV_RB32(&scratch[16]);
+ st->codecpar->height = AV_RB32(&scratch[12]);
if (film->video_type == AV_CODEC_ID_RAWVIDEO) {
if (scratch[20] == 24) {
- st->codec->pix_fmt = AV_PIX_FMT_RGB24;
+ st->codecpar->format = AV_PIX_FMT_RGB24;
} else {
av_log(s, AV_LOG_ERROR, "raw video is using unhandled %dbpp\n", scratch[20]);
return -1;
@@ -171,24 +171,24 @@ static int film_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
film->audio_stream_index = st->index;
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = film->audio_type;
- st->codec->codec_tag = 1;
- st->codec->channels = film->audio_channels;
- st->codec->sample_rate = film->audio_samplerate;
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = film->audio_type;
+ st->codecpar->codec_tag = 1;
+ st->codecpar->channels = film->audio_channels;
+ st->codecpar->sample_rate = film->audio_samplerate;
if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) {
- st->codec->bits_per_coded_sample = 18 * 8 / 32;
- st->codec->block_align = st->codec->channels * 18;
+ st->codecpar->bits_per_coded_sample = 18 * 8 / 32;
+ st->codecpar->block_align = st->codecpar->channels * 18;
st->need_parsing = AVSTREAM_PARSE_FULL;
} else {
- st->codec->bits_per_coded_sample = film->audio_bits;
- st->codec->block_align = st->codec->channels *
- st->codec->bits_per_coded_sample / 8;
+ st->codecpar->bits_per_coded_sample = film->audio_bits;
+ st->codecpar->block_align = st->codecpar->channels *
+ st->codecpar->bits_per_coded_sample / 8;
}
- st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
- st->codec->bits_per_coded_sample;
+ st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *
+ st->codecpar->bits_per_coded_sample;
}
/* load the sample table */
@@ -206,7 +206,7 @@ static int film_read_header(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
- if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
avpriv_set_pts_info(st, 33, 1, film->base_clock);
else
avpriv_set_pts_info(st, 64, 1, film->audio_samplerate);