diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-10-18 14:45:10 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-10-18 15:17:14 +0300 |
commit | bb1d3f1078e04b23fb5c202700163664ec2aa3ec (patch) | |
tree | 2f023a90a946e1e322c45f5e008ef84c26228839 | |
parent | 6e8d856ad6d3decfabad83bc169c2e7a16a16b55 (diff) |
avformat/rsd: add VAG support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/rsd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 6b2016b197..98e793e9ef 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -26,6 +26,7 @@ #include "internal.h" static const AVCodecTag rsd_tags[] = { + { AV_CODEC_ID_ADPCM_PSX, MKTAG('V','A','G',' ') }, { AV_CODEC_ID_ADPCM_THP, MKTAG('G','A','D','P') }, { AV_CODEC_ID_ADPCM_THP, MKTAG('W','A','D','P') }, { AV_CODEC_ID_ADPCM_IMA_RAD, MKTAG('R','A','D','P') }, @@ -37,7 +38,6 @@ static const AVCodecTag rsd_tags[] = { static const uint32_t rsd_unsupported_tags[] = { MKTAG('O','G','G',' '), - MKTAG('V','A','G',' '), MKTAG('X','M','A',' '), }; @@ -95,6 +95,11 @@ static int rsd_read_header(AVFormatContext *s) avio_skip(pb, 4); // Unknown switch (codec->codec_id) { + case AV_CODEC_ID_ADPCM_PSX: + codec->block_align = 16 * codec->channels; + if (pb->seekable) + st->duration = av_get_audio_frame_duration(codec, avio_size(pb) - start); + break; case AV_CODEC_ID_ADPCM_IMA_RAD: codec->block_align = 20 * codec->channels; if (pb->seekable) @@ -163,6 +168,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; 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) { ret = av_get_packet(s->pb, pkt, codec->block_align); } else if (codec->codec_tag == MKTAG('W','A','D','P') && |