changeset 3687:bfcf76cad06a libavcodec

print more correct error messges
author michael
date Fri, 08 Sep 2006 08:27:51 +0000
parents 5fc587a5feea
children c63b9bb49532
files mpegaudiodec.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Thu Sep 07 04:08:34 2006 +0000
+++ b/mpegaudiodec.c	Fri Sep 08 08:27:51 2006 +0000
@@ -2622,9 +2622,11 @@
         break;
     }
 
-    if(s->frame_size<=0 || s->frame_size < buf_size){
+    if(s->frame_size<=0 || s->frame_size > buf_size){
         av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
         return -1;
+    }else if(s->frame_size < buf_size){
+        av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n");
     }
 
     out_size = mp_decode_frame(s, out_samples, buf, buf_size);