diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2018-10-08 11:33:26 -0400 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2018-10-09 15:05:44 +0100 |
commit | b1504e7796a420c8748a2dcb12a2b780ecf42c04 (patch) | |
tree | 54c7f9575d23dfdda3f512be20867077c5bb4f2a /libavcodec/h264_slice.c | |
parent | e10fe34e7c6031baa07fb3bad5c284b2911f501b (diff) | |
download | ffmpeg-b1504e7796a420c8748a2dcb12a2b780ecf42c04.tar.gz |
h264_slice: Copy the value of x264_build before calling h264_slice_header_init during thread init
If we don't copy this value first, it is seen as 0 by h264_slice_header_init,
due to zero-allocation of the new context, triggering an old hack that
multiplied the denominator by 2 for files produced by old x264 versions, but
only if more than one thread was used.
Fixes #7475 and #7083.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 58e1aaf02f..d09cee4b13 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -358,6 +358,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst, h->mb_num = h1->mb_num; h->mb_stride = h1->mb_stride; h->b_stride = h1->b_stride; + h->x264_build = h1->x264_build; if (h->context_initialized || h1->context_initialized) { if ((err = h264_slice_header_init(h)) < 0) { @@ -399,7 +400,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst, h->enable_er = h1->enable_er; h->workaround_bugs = h1->workaround_bugs; - h->x264_build = h1->x264_build; h->droppable = h1->droppable; // extradata/NAL handling |