---
 libavcodec/ac3enc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git libavcodec/ac3enc.c libavcodec/ac3enc.c
index 77b9b6f..fc8ae06 100644
--- libavcodec/ac3enc.c
+++ libavcodec/ac3enc.c
@@ -1188,7 +1188,8 @@ static int AC3_encode_frame(AVCodecContext *avctx,
             }
 
             /* Normalize the samples to use the maximum available precision */
-            v = FFMAX(0, 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2));
+            v = 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2);
+            v = FFMAX(0, v);
             exp_samples[i][ch] = v - 9;
             lshift_tab(input_samples, AC3_BLOCK_SIZE*2, v);
 
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to