[FFmpeg-cvslog] riff: fix remuxing of atrac3 in wav

Piotr Bandurski git at videolan.org
Sat Aug 25 20:27:36 CEST 2012


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sat Aug 25 13:52:20 2012 +0200| [0bb37bbc0f55f157cb763428baca9b63d3e81108] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0bb37bbc0f55f157cb763428baca9b63d3e81108
---

 libavformat/riff.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 77dc797..1fa8928 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))) {



More information about the ffmpeg-cvslog mailing list