Browse Source

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.
tags/n3.3
Ronald S. Bultje 9 years ago
parent
commit
f800d6508d
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/dnxhddec.c

+ 1
- 0
libavcodec/dnxhddec.c View File

@@ -145,6 +145,7 @@ static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;

ctx->avctx = avctx;
// make sure VLC tables will be loaded when cid is parsed
ctx->cid = -1;



Loading…
Cancel
Save