changeset 2360:0fcb4d572719 libavcodec

workaround apps which dont provided correctly padded streams
author michael
date Fri, 19 Nov 2004 20:49:12 +0000
parents a3c029107a88
children 8616fd2dd2ef
files mjpeg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg.c	Fri Nov 19 18:19:36 2004 +0000
+++ b/mjpeg.c	Fri Nov 19 20:49:12 2004 +0000
@@ -1832,9 +1832,9 @@
 			*(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)