aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-11-10 21:29:25 +0100
committerPaul B Mahol <onemda@gmail.com>2015-11-11 09:31:44 +0100
commit2905c512044807567fc93402f7b3d6dca3552ce6 (patch)
treecacf32529048f1d4abc4279fc8403c75cedff742 /libavformat
parent8f3a9603538b8633fb873fcee7ffcec72e849c42 (diff)
downloadffmpeg-2905c512044807567fc93402f7b3d6dca3552ce6.tar.gz
avformat/rsd: XMA2 is actually stored, not XMA1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rsd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 5dd590f786..01a27f9493 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -33,7 +33,7 @@ static const AVCodecTag rsd_tags[] = {
{ AV_CODEC_ID_ADPCM_IMA_WAV, MKTAG('X','A','D','P') },
{ AV_CODEC_ID_PCM_S16BE, MKTAG('P','C','M','B') },
{ AV_CODEC_ID_PCM_S16LE, MKTAG('P','C','M',' ') },
- { AV_CODEC_ID_XMA1, MKTAG('X','M','A',' ') },
+ { AV_CODEC_ID_XMA2, MKTAG('X','M','A',' ') },
{ AV_CODEC_ID_NONE, 0 },
};
@@ -95,12 +95,12 @@ static int rsd_read_header(AVFormatContext *s)
avio_skip(pb, 4); // Unknown
switch (codec->codec_id) {
- case AV_CODEC_ID_XMA1:
+ case AV_CODEC_ID_XMA2:
codec->block_align = 2048;
- ff_alloc_extradata(codec, 28);
+ ff_alloc_extradata(codec, 34);
if (!codec->extradata)
return AVERROR(ENOMEM);
- memset(codec->extradata, 0, 28);
+ memset(codec->extradata, 0, 34);
break;
case AV_CODEC_ID_ADPCM_PSX:
codec->block_align = 16 * codec->channels;
@@ -160,7 +160,7 @@ static int rsd_read_header(AVFormatContext *s)
}
avio_skip(pb, start - avio_tell(pb));
- if (codec->codec_id == AV_CODEC_ID_XMA1) {
+ if (codec->codec_id == AV_CODEC_ID_XMA2) {
avio_skip(pb, avio_rb32(pb) + avio_rb32(pb));
st->duration = avio_rb32(pb);
}
@@ -181,7 +181,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
if (codec->codec_id == AV_CODEC_ID_ADPCM_IMA_RAD ||
codec->codec_id == AV_CODEC_ID_ADPCM_PSX ||
codec->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV ||
- codec->codec_id == AV_CODEC_ID_XMA1) {
+ codec->codec_id == AV_CODEC_ID_XMA2) {
ret = av_get_packet(s->pb, pkt, codec->block_align);
} else if (codec->codec_tag == MKTAG('W','A','D','P') &&
codec->channels > 1) {