From 5ec0bdf2c524224f30ba4786f47324970aed4aaa Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 9 May 2015 21:54:47 +0200 Subject: h264: do not update the context fields copied between threads after finish_setup() Should fix a large number of possible races with frame threading. --- libavcodec/h264.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavcodec/h264.h') diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 624a761ded..6712c7e492 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -721,6 +721,11 @@ typedef struct H264Context { int frame_recovered; ///< Initial frame has been completely recovered + /* for frame threading, this is set to 1 + * after finish_setup() has been called, so we cannot modify + * some context properties (which are supposed to stay constant between + * slices) anymore */ + int setup_finished; // Timestamp stuff int sei_buffering_period_present; ///< Buffering period SEI flag -- cgit v1.2.3