summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-05-09 21:54:47 +0200
committerAnton Khirnov <anton@khirnov.net>2015-06-27 16:48:48 +0200
commit5ec0bdf2c524224f30ba4786f47324970aed4aaa (patch)
tree7135febfa2d57e90a8a7009c4772c7162885f593 /libavcodec/h264.h
parent6d4d3fee63c46d921c4870feab79269af94e84e1 (diff)
h264: do not update the context fields copied between threads after finish_setup()
Should fix a large number of possible races with frame threading.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h5
1 files changed, 5 insertions, 0 deletions
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