aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-11-19 20:49:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-11-19 20:49:12 +0000
commit55429b553429b9c2f3f16e1b5d5038c8b6f45d9f (patch)
tree8efa1c5248548fd4ef43b87f81ef0fe638bcf631 /libavcodec/mjpeg.c
parent9993064eec81ad5dc346e447497ecedc56a8fea6 (diff)
downloadffmpeg-55429b553429b9c2f3f16e1b5d5038c8b6f45d9f.tar.gz
workaround apps which dont provided correctly padded streams
Originally committed as revision 3695 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 6f1b908e97..d281b063db 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)