Return an error and stop encoding if bit allocation fails.
---
libavcodec/ac3enc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git libavcodec/ac3enc.c libavcodec/ac3enc.c
index fa6dbe2..9e761a0 100644
--- libavcodec/ac3enc.c
+++ libavcodec/ac3enc.c
@@ -1291,7 +1291,8 @@ static int AC3_encode_frame(AVCodecContext *avctx,
adjust_frame_size(s);
- compute_bit_allocation(s, bap, exp, exp_strategy, frame_bits);
+ if (compute_bit_allocation(s, bap, exp, exp_strategy, frame_bits))
+ return AVERROR(EINVAL);
/* everything is known... let's output the frame */
output_frame_header(s, frame);
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc