In libavcodec, thread-safe callback merely means callback that can run
on any thread. It does not imply that the codec should be re-entrant.
In other words, it boils down to not using thread-specific variables.
The VLC get_buffer callback is not reentrant currently, but it does not
care which thread it runs on.
if( i_codec_id == AV_CODEC_ID_MPEG4 )
p_sys->p_context->thread_count = 1;
+ p_sys->p_context->thread_safe_callbacks = true;
#endif
char *hw = var_CreateGetString( p_dec, "avcodec-hw" ); /* FIXME */