[SCM] libav/experimental: Make the MJPEG decoder return -1 when no image was decoded so that decode errors are actually recognizable as such.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:48:34 UTC 2013


The following commit has been merged in the experimental branch:
commit 1496b04c28ba9ef291bef1936641bff364484075
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Sat Jul 4 18:22:33 2009 +0000

    Make the MJPEG decoder return -1 when no image was decoded so that decode
    errors are actually recognizable as such.
    
    Originally committed as revision 19343 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b5f8281..a40dfdb 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list