Browse Source

avcodec/bmp_parser: Fix frame_start_found in cross frame cases

Fixes part of ticket 5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bfe945ac3a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.4.14
Michael Niedermayer 9 years ago
parent
commit
ede92da7a6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/bmp_parser.c

+ 4
- 1
libavcodec/bmp_parser.c View File

@@ -91,7 +91,10 @@ flush:
if (ff_combine_frame(&bpc->pc, next, &buf, &buf_size) < 0)
return buf_size;

bpc->pc.frame_start_found = 0;
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;
*poutbuf_size = buf_size;


Loading…
Cancel
Save