This fixes the following tsan warning: WARNING: ThreadSanitizer: data race (pid=95987) Write of size 4 at 0x7d5000004278 by main thread: #0 get_frame_defaults frame.c:117 (ffmpeg:x86_64+0x1016c5b18) [..] Previous write of size 4 at 0x7d5000004278 by thread T2: [failed to restore the stack] --- libavcodec/dnxhddec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 383e64c..77e62a2 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -626,10 +626,10 @@ decode_coding_unit: return ret; if (first_field) { - if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) - return ret; picture->pict_type = AV_PICTURE_TYPE_I; picture->key_frame = 1; + if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) + return ret; } ctx->buf_size = buf_size - ctx->data_offset; -- 2.8.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel