On 3/29/17, Ronald S. Bultje <rsbul...@gmail.com> wrote:
> 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.
> ---
>  libavcodec/dnxhddec.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
> index 305fd52..766467e 100644
> --- a/libavcodec/dnxhddec.c
> +++ b/libavcodec/dnxhddec.c
> @@ -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;
>
> --
> 2.8.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

ok
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to