X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fhapdec.c;h=e6b7d61b92838937a1977d306ff1ee09c66b77e6;hb=3edc6d1cd9ef23e809a8d814dbfb589e7e1f57fe;hp=6e3c138199ff122360fd3f584a7c73c68fe21d39;hpb=41070923490a678911435fb1d65bba04c6bf2a5e;p=ffmpeg diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 6e3c138199f..e6b7d61b928 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -177,7 +177,8 @@ static int hap_decode(AVCodecContext *avctx, void *data, ret = ff_thread_get_buffer(avctx, &tframe, 0); if (ret < 0) return ret; - ff_thread_finish_setup(avctx); + if (avctx->codec->update_thread_context) + ff_thread_finish_setup(avctx); /* Use the decompress function on the texture, one block per thread */ avctx->execute2(avctx, decompress_texture_thread, tframe.f, NULL, blocks);