ffmpeg: fix deadlock caused by calling avctx->thread_count after codec_open
Merge pull request #5101 from FernetMenta/ffmpeg-threads

ffmpeg: fix deadlock caused by calling avctx->thread_count after codec_o...