mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
dnxhd: initialize DNXHDContext::avctx to each thread's respective one.
Otherwise all thread's private contexts have the avctx pointer set to the AVCodecContext of the first thread, which means all writes to ctx->avctx->* (in e.g. read_header) are effectively race conditions. Fixes fate-dnxhd under tsan.
This commit is contained in:
parent
ef71dc7948
commit
f800d6508d
@ -145,6 +145,7 @@ static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
DNXHDContext *ctx = avctx->priv_data;
|
DNXHDContext *ctx = avctx->priv_data;
|
||||||
|
|
||||||
|
ctx->avctx = avctx;
|
||||||
// make sure VLC tables will be loaded when cid is parsed
|
// make sure VLC tables will be loaded when cid is parsed
|
||||||
ctx->cid = -1;
|
ctx->cid = -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user