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

setting thread_count after avcodec_open is not only useless, it does even harm. ffmpeg loops over thread_count and does a join for each thread spawned. setting thread_count to 1 after threads have been created will skip the join. some other weird things may also happen.