[FFmpeg-cvslog] h264: do not mess up cur_chroma_format_idc during thread update
Michael Niedermayer
git at videolan.org
Wed Jan 16 05:20:16 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 16 04:46:20 2013 +0100| [31c4a1b7d0a052f9717185900e01c2500b55e51b] | committer: Michael Niedermayer
h264: do not mess up cur_chroma_format_idc during thread update
Fixes out of array reads
Regression probably since allowing pixel format changes or a related commit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31c4a1b7d0a052f9717185900e01c2500b55e51b
---
libavcodec/h264.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d5f4760..3dcf00a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1224,6 +1224,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
/* copy block_offset since frame_start may not be called */
memcpy(h->block_offset, h1->block_offset, sizeof(h->block_offset));
h264_set_parameter_from_sps(h);
+ h->cur_chroma_format_idc = h1->cur_chroma_format_idc;
}
err = ff_mpeg_update_thread_context(dst, src);
More information about the ffmpeg-cvslog
mailing list