diff options
author | Derek Buitenhuis | 2016-04-10 20:58:15 +0100 |
---|---|---|
committer | Derek Buitenhuis | 2016-04-10 20:59:55 +0100 |
commit | 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch) | |
tree | 0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/xa.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/xa.c')
-rw-r--r-- | libavformat/xa.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/xa.c b/libavformat/xa.c index 43661dea43..810e0c0197 100644 --- a/libavformat/xa.c +++ b/libavformat/xa.c @@ -73,24 +73,24 @@ static int xa_read_header(AVFormatContext *s) if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_id = AV_CODEC_ID_ADPCM_EA_MAXIS_XA; + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + st->codecpar->codec_id = AV_CODEC_ID_ADPCM_EA_MAXIS_XA; avio_skip(pb, 4); /* Skip the XA ID */ xa->out_size = avio_rl32(pb); avio_skip(pb, 2); /* Skip the tag */ - st->codec->channels = avio_rl16(pb); - st->codec->sample_rate = avio_rl32(pb); + st->codecpar->channels = avio_rl16(pb); + st->codecpar->sample_rate = avio_rl32(pb); avio_skip(pb, 4); /* Skip average byte rate */ avio_skip(pb, 2); /* Skip block align */ avio_skip(pb, 2); /* Skip bits-per-sample */ - if (!st->codec->channels || !st->codec->sample_rate) + if (!st->codecpar->channels || !st->codecpar->sample_rate) return AVERROR_INVALIDDATA; - st->codec->bit_rate = av_clip(15LL * st->codec->channels * 8 * - st->codec->sample_rate / 28, 0, INT_MAX); + st->codecpar->bit_rate = av_clip(15LL * st->codecpar->channels * 8 * + st->codecpar->sample_rate / 28, 0, INT_MAX); - avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); st->start_time = 0; return 0; @@ -108,7 +108,7 @@ static int xa_read_packet(AVFormatContext *s, if (xa->sent_bytes >= xa->out_size) return AVERROR_EOF; /* 1 byte header and 14 bytes worth of samples * number channels per block */ - packet_size = 15*st->codec->channels; + packet_size = 15*st->codecpar->channels; ret = av_get_packet(pb, pkt, packet_size); if(ret < 0) |