avcodec/bmp_parser: Fix frame_start_found in cross frame cases

Fixes part of ticket 5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-06-06 14:01:43 +02:00
parent b5bc436ebc
commit bfe945ac3a
1 changed files with 4 additions and 1 deletions

View File

@ -91,6 +91,9 @@ flush:
if (ff_combine_frame(&bpc->pc, next, &buf, &buf_size) < 0)
return buf_size;
if (next != END_NOT_FOUND && next < 0)
bpc->pc.frame_start_found = FFMAX(bpc->pc.frame_start_found - i - 1, 0);
else
bpc->pc.frame_start_found = 0;
*poutbuf = buf;