Commit c5a86c55 authored by michael's avatar michael

better fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2513 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bb33d277
...@@ -1681,7 +1681,7 @@ static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end) ...@@ -1681,7 +1681,7 @@ static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end)
while (buf_ptr < buf_end) { while (buf_ptr < buf_end) {
v = *buf_ptr++; v = *buf_ptr++;
v2 = *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++; val = *buf_ptr++;
goto found; goto found;
} }
...@@ -1874,9 +1874,6 @@ not_the_end: ...@@ -1874,9 +1874,6 @@ not_the_end:
} }
} }
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); dprintf("mjpeg decode frame unused %d bytes\n", buf_end - buf_ptr);
// return buf_end - buf_ptr; // return buf_end - buf_ptr;
return buf_ptr - buf; return buf_ptr - buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment