fix block_align for mp3 stream copy
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Aug 2007 23:23:42 +0000 (23:23 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Aug 2007 23:23:42 +0000 (23:23 +0000)
Originally committed as revision 9880 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 8ec10a2..859f3ff 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1527,6 +1527,8 @@ static int av_encode(AVFormatContext **output_files,
                 codec->channels = icodec->channels;
                 codec->frame_size = icodec->frame_size;
                 codec->block_align= icodec->block_align;
                 codec->channels = icodec->channels;
                 codec->frame_size = icodec->frame_size;
                 codec->block_align= icodec->block_align;
+                if(codec->block_align == 1 && codec->codec_id == CODEC_ID_MP3)
+                    codec->block_align= 0;
                 break;
             case CODEC_TYPE_VIDEO:
                 if(using_vhook) {
                 break;
             case CODEC_TYPE_VIDEO:
                 if(using_vhook) {