diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 22:58:15 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 22:59:55 +0300 |
commit | 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch) | |
tree | 0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/avr.c | |
parent | 60b75186b2c878b6257b43c8fcc0b1356ada218e (diff) | |
parent | 9200514ad8717c63f82101dc394f4378854325bf (diff) |
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/avr.c')
-rw-r--r-- | libavformat/avr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/avr.c b/libavformat/avr.c index a33134eed5..294160e024 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -46,22 +46,22 @@ static int avr_read_header(AVFormatContext *s) if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; avio_skip(s->pb, 4); // magic avio_skip(s->pb, 8); // sample_name chan = avio_rb16(s->pb); if (!chan) { - st->codec->channels = 1; + st->codecpar->channels = 1; } else if (chan == 0xFFFFu) { - st->codec->channels = 2; + st->codecpar->channels = 2; } else { avpriv_request_sample(s, "chan %d", chan); return AVERROR_PATCHWELCOME; } - st->codec->bits_per_coded_sample = bps = avio_rb16(s->pb); + st->codecpar->bits_per_coded_sample = bps = avio_rb16(s->pb); sign = avio_rb16(s->pb); @@ -69,21 +69,21 @@ static int avr_read_header(AVFormatContext *s) avio_skip(s->pb, 2); // midi avio_skip(s->pb, 1); // replay speed - st->codec->sample_rate = avio_rb24(s->pb); + st->codecpar->sample_rate = avio_rb24(s->pb); avio_skip(s->pb, 4 * 3); avio_skip(s->pb, 2 * 3); avio_skip(s->pb, 20); avio_skip(s->pb, 64); - st->codec->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign); - if (st->codec->codec_id == AV_CODEC_ID_NONE) { + st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign); + if (st->codecpar->codec_id == AV_CODEC_ID_NONE) { avpriv_request_sample(s, "Bps %d and sign %d", bps, sign); return AVERROR_PATCHWELCOME; } - st->codec->block_align = bps * st->codec->channels / 8; + st->codecpar->block_align = bps * st->codecpar->channels / 8; - avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); return 0; } |