aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-08-25 13:52:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-25 20:21:52 +0200
commit0bb37bbc0f55f157cb763428baca9b63d3e81108 (patch)
treece97fa1c94a9f4f10f2388b5089cfaa76b4a2291
parent65b552cc314b5994c6f4cda19872812a68980dbe (diff)
downloadffmpeg-0bb37bbc0f55f157cb763428baca9b63d3e81108.tar.gz
riff: fix remuxing of atrac3 in wav
The original codec expects 0 as bps or refuses to play the remuxed file. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/riff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 77dc797157..1fa89289cd 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -462,7 +462,11 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
avio_wl16(pb, enc->channels);
avio_wl32(pb, enc->sample_rate);
- if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3 || enc->codec_id == AV_CODEC_ID_GSM_MS || enc->codec_id == AV_CODEC_ID_G723_1) {
+ if (enc->codec_id == CODEC_ID_ATRAC3 ||
+ enc->codec_id == CODEC_ID_G723_1 ||
+ enc->codec_id == CODEC_ID_GSM_MS ||
+ enc->codec_id == CODEC_ID_MP2 ||
+ enc->codec_id == CODEC_ID_MP3) {
bps = 0;
} else {
if (!(bps = av_get_bits_per_sample(enc->codec_id))) {