ffmpeg: revert 492cc1
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 14 May 2012 13:15:11 +0000 (15:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 14 May 2012 13:15:11 +0000 (15:15 +0200)
This restores correct block_align values in case of stream copy.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 02efdf4..0bd318a 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3076,6 +3076,10 @@ static int transcode_init(void)
                 codec->frame_size         = icodec->frame_size;
                 codec->audio_service_type = icodec->audio_service_type;
                 codec->block_align        = icodec->block_align;
+                if(codec->block_align == 1 && codec->codec_id == CODEC_ID_MP3)
+                    codec->block_align= 0;
+                if(codec->codec_id == CODEC_ID_AC3)
+                    codec->block_align= 0;
                 break;
             case AVMEDIA_TYPE_VIDEO:
                 codec->pix_fmt            = icodec->pix_fmt;