[FFmpeg-cvslog] r19343 - trunk/libavcodec/mjpegdec.c

reimar subversion
Sat Jul 4 20:22:33 CEST 2009


Author: reimar
Date: Sat Jul  4 20:22:33 2009
New Revision: 19343

Log:
Make the MJPEG decoder return -1 when no image was decoded so that decode
errors are actually recognizable as such.

Modified:
   trunk/libavcodec/mjpegdec.c

Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c	Sat Jul  4 20:20:35 2009	(r19342)
+++ trunk/libavcodec/mjpegdec.c	Sat Jul  4 20:22:33 2009	(r19343)
@@ -1479,6 +1479,8 @@ not_the_end:
             }
         }
     }
+    av_log(avctx, AV_LOG_FATAL, "No JPEG data found in image\n");
+    return -1;
 the_end:
     av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", buf_end - buf_ptr);
 //    return buf_end - buf_ptr;



More information about the ffmpeg-cvslog mailing list