mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 19:55:08 +00:00
better fix
Originally committed as revision 2513 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7d58735942
commit
9515c0c107
@ -1681,7 +1681,7 @@ static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end)
|
||||
while (buf_ptr < buf_end) {
|
||||
v = *buf_ptr++;
|
||||
v2 = *buf_ptr;
|
||||
if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe)) {
|
||||
if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) {
|
||||
val = *buf_ptr++;
|
||||
goto found;
|
||||
}
|
||||
@ -1874,9 +1874,6 @@ not_the_end:
|
||||
}
|
||||
}
|
||||
the_end:
|
||||
if(buf_ptr > buf_end)
|
||||
buf_ptr = buf_end;
|
||||
|
||||
dprintf("mjpeg decode frame unused %d bytes\n", buf_end - buf_ptr);
|
||||
// return buf_end - buf_ptr;
|
||||
return buf_ptr - buf;
|
||||
|
Loading…
Reference in New Issue
Block a user