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

diff --git libavcodec/ac3enc.c libavcodec/ac3enc.c
index e1af91d..f574246 100644
--- libavcodec/ac3enc.c
+++ libavcodec/ac3enc.c
@@ -1187,9 +1187,7 @@ static int AC3_encode_frame(AVCodecContext *avctx,
             }
 
             /* Normalize the samples to use the maximum available precision */
-            v = 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2);
-            if (v < 0)
-                v = 0;
+            v = FFMAX(0, 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2));
             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