changeset 9914:e1aaf6216769 libavcodec

Make the MJPEG decoder return -1 when no image was decoded so that decode errors are actually recognizable as such.
author reimar
date Sat, 04 Jul 2009 18:22:33 +0000
parents b73796e93571
children f1707434e40b
files mjpegdec.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mjpegdec.c	Sat Jul 04 18:20:35 2009 +0000
+++ b/mjpegdec.c	Sat Jul 04 18:22:33 2009 +0000
@@ -1479,6 +1479,8 @@
             }
         }
     }
+    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;