deps-libff: Fix other multithreaded image decoders

In the same manner that PNG doesn't appear to work properly
with multiple threads, TIFF, JPEG2000 and WEBP also appears
to not render correctly (use of FFmpeg's ff_thread_* routines)
if decode is called before the automatic thread detection
has returned a suggested thread count for the decoder.
This commit is contained in:
John Bradley 2015-03-20 17:20:10 -05:00
parent c78fa63b47
commit aa8363bb87

View file

@ -251,8 +251,11 @@ static bool find_decoder(struct ff_demuxer *demuxer, AVStream *stream)
// > 1
codec_context->refcounted_frames = 1;
// png decoder has serious issues with multiple threads
if (codec_context->codec_id == AV_CODEC_ID_PNG)
// png/tiff decoders have serious issues with multiple threads
if (codec_context->codec_id == AV_CODEC_ID_PNG
|| codec_context->codec_id == AV_CODEC_ID_TIFF
|| codec_context->codec_id == AV_CODEC_ID_JPEG2000
|| codec_context->codec_id == AV_CODEC_ID_WEBP)
codec_context->thread_count = 1;
if (demuxer->options.is_hw_decoding) {