changeset 11001:621268959a5c libavcodec

Only check frame size if the header is valid.
author jbr
date Sun, 24 Jan 2010 23:55:33 +0000
parents 6d22c964c601
children 1c8892d7a090
files ac3dec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Sun Jan 24 22:47:50 2010 +0000
+++ b/ac3dec.c	Sun Jan 24 23:55:33 2010 +0000
@@ -1237,7 +1237,7 @@
     err = parse_frame_header(s);
 
     /* check that reported frame size fits in input buffer */
-    if(s->frame_size > buf_size) {
+    if(!err && s->frame_size > buf_size) {
         av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
         err = AAC_AC3_PARSE_ERROR_FRAME_SIZE;
     }