aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-06-06 14:01:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-15 18:54:34 +0200
commit731848ef80838397f8e9281a6c89d9fe30da77e0 (patch)
tree5a04d33837fca189bbc31b516ab3a017e6d7eba1
parent76fd8145a1e24e95eea9af70a3a25e518e2d0be1 (diff)
downloadffmpeg-731848ef80838397f8e9281a6c89d9fe30da77e0.tar.gz
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 bfe945ac3a0c328371dc4b4cc3409b7da5784cb8) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/bmp_parser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c
index b06e3e84ef..c9fe153de1 100644
--- a/libavcodec/bmp_parser.c
+++ b/libavcodec/bmp_parser.c
@@ -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;