diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-10-24 20:41:32 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-10-26 10:08:01 +0100 |
commit | 035ae3c0096f6c0a3f199d331ed4094ff5beafd1 (patch) | |
tree | 5eb7e43f1e39621980e9cb2ceef6c098c95aa40c /libavformat/genh.c | |
parent | 2ccc1b304e08a5f5e045c056e897ed377bf670f7 (diff) | |
download | ffmpeg-035ae3c0096f6c0a3f199d331ed4094ff5beafd1.tar.gz |
avcodec: add SDX2 DPCM decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/genh.c')
-rw-r--r-- | libavformat/genh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/genh.c b/libavformat/genh.c index 6e4abae7cf..97068b4483 100644 --- a/libavformat/genh.c +++ b/libavformat/genh.c @@ -84,6 +84,7 @@ static int genh_read_header(AVFormatContext *s) case 5: st->codec->codec_id = st->codec->block_align > 0 ? AV_CODEC_ID_PCM_S8_PLANAR : AV_CODEC_ID_PCM_S8; break; + case 6: st->codec->codec_id = AV_CODEC_ID_SDX2_DPCM; break; case 7: ret = ff_alloc_extradata(st->codec, 2); if (ret < 0) return ret; @@ -168,6 +169,9 @@ static int genh_read_packet(AVFormatContext *s, AVPacket *pkt) } } ret = 0; + } else if (codec->codec_id == AV_CODEC_ID_SDX2_DPCM) { + ret = av_get_packet(s->pb, pkt, codec->block_align * 1024); + } else { ret = av_get_packet(s->pb, pkt, codec->block_align ? codec->block_align : 1024 * codec->channels); } |