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

reimar subversion
Sat Jul 4 20:24:43 CEST 2009


Author: reimar
Date: Sat Jul  4 20:24:43 2009
New Revision: 19344

Log:
If the end of the input buffer is reached while decoding MJPEG and at least
a valid SOF was found, emulate an EOI.
This allows e.g. to at least decode the available part of incomplete MJPEG frames.

Modified:
   trunk/libavcodec/mjpegdec.c

Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c	Sat Jul  4 20:22:33 2009	(r19343)
+++ trunk/libavcodec/mjpegdec.c	Sat Jul  4 20:24:43 2009	(r19344)
@@ -1479,6 +1479,10 @@ not_the_end:
             }
         }
     }
+    if (s->got_picture) {
+        av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
+        goto eoi_parser;
+    }
     av_log(avctx, AV_LOG_FATAL, "No JPEG data found in image\n");
     return -1;
 the_end:



More information about the ffmpeg-cvslog mailing list