[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec faad.c,1.12,1.13

Måns Rullgård CVS mru
Sun Mar 5 13:32:27 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv2657

Modified Files:
	faad.c 
Log Message:
Make faac_decode_frame return -1 on error and not 0 which avoids
stalling and infinite loop.
Patch by Baptiste COUDURIER <baptiste coudurier at smartjog com>


Index: faad.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/faad.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- faad.c	1 Mar 2006 23:19:04 -0000	1.12
+++ faad.c	5 Mar 2006 12:32:24 -0000	1.13
@@ -164,7 +164,7 @@
         if(r < 0){
             av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
                    s->faacDecGetErrorMessage(frame_info.error));
-            return 0;
+            return -1;
         }
         avctx->sample_rate = srate;
         avctx->channels = channels;
@@ -176,7 +176,7 @@
     if (frame_info.error > 0) {
         av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n",
                 s->faacDecGetErrorMessage(frame_info.error));
-        return 0;
+        return -1;
     }
 
     frame_info.samples *= s->sample_size;





More information about the ffmpeg-cvslog mailing list