avcodec/pthread: Make sure ff_thread_finish_setup() conditions match

Prevents warning from being shown due to multiple calls.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pthread: use THREAD_SAFE_CALLBACKS() to simplifx more code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>