[SCM] libav/experimental: workaround apps which dont provided correctly padded streams

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:42:14 UTC 2013


The following commit has been merged in the experimental branch:
commit 55429b553429b9c2f3f16e1b5d5038c8b6f45d9f
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Nov 19 20:49:12 2004 +0000

    workaround apps which dont provided correctly padded streams
    
    Originally committed as revision 3695 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 6f1b908..d281b06 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -1832,9 +1832,9 @@ static int mjpeg_decode_frame(AVCodecContext *avctx,
 			*(dst++) = x;
 			if (x == 0xff)
 			{
-			    while(*src == 0xff) src++;
+                            while(src<buf_end && x == 0xff)
+                                x = *(src++);
 
-			    x = *(src++);
 			    if (x >= 0xd0 && x <= 0xd7)
 				*(dst++) = x;
 			    else if (x)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list