[FFmpeg-cvslog] avcodec/bmp_parser: Fix frame_start_found in cross frame cases
Michael Niedermayer
git at videolan.org
Sat Aug 13 16:29:58 EEST 2016
ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jun 6 14:01:43 2016 +0200| [9f1e8b4fb28f92f624bc2da431f438dfe43c7332] | committer: Michael Niedermayer
avcodec/bmp_parser: Fix frame_start_found in cross frame cases
Fixes part of ticket 5598
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit bfe945ac3a0c328371dc4b4cc3409b7da5784cb8)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f1e8b4fb28f92f624bc2da431f438dfe43c7332
---
libavcodec/bmp_parser.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c
index b06e3e8..c9fe153 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;
More information about the ffmpeg-cvslog
mailing list