diff options
author | Juanjo <pulento@users.sourceforge.net> | 2015-06-04 14:47:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-04 17:03:34 +0200 |
commit | a213e57cef82aefb57f1b2233f913081df153c7b (patch) | |
tree | 5dfcd20c35b2dc28902a6eaf1a6acbfe0da51c52 /libavformat/riffenc.c | |
parent | 3b4e694ead8b240e09b9e50140840ef94e1a0688 (diff) | |
download | ffmpeg-a213e57cef82aefb57f1b2233f913081df153c7b.tar.gz |
lavf/riffenc: Set correct block align for mp2.
Rounding by Michael.
Fixes ticket #4565.
Diffstat (limited to 'libavformat/riffenc.c')
-rw-r--r-- | libavformat/riffenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index d429df0ba3..85c953f2ef 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -103,7 +103,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags) } if (enc->codec_id == AV_CODEC_ID_MP2) { - blkalign = frame_size; + blkalign = (144 * enc->bit_rate - 1)/enc->sample_rate + 1; } else if (enc->codec_id == AV_CODEC_ID_MP3) { blkalign = 576 * (enc->sample_rate <= (24000 + 32000)/2 ? 1 : 2); } else if (enc->codec_id == AV_CODEC_ID_AC3) { |