]> git.sesse.net Git - ffmpeg/commitdiff
Make ac3 in avi work better.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 26 May 2008 00:05:30 +0000 (00:05 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 26 May 2008 00:05:30 +0000 (00:05 +0000)
fixes issue355.

Originally committed as revision 13406 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/riff.c

index 322e8131ffda99b6e2705d65455779e348efd91c..43e2c36f44e9101cf0f8f83d41c9a88519914ba7 100644 (file)
@@ -257,7 +257,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
         av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps);
     }
 
-    if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) {
+    if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_AC3) {
         blkalign = enc->frame_size; //this is wrong, but it seems many demuxers do not work if this is set correctly
         //blkalign = 144 * enc->bit_rate/enc->sample_rate;
     } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { //