Commit dfee5996 authored by Jean-Paul Saman's avatar Jean-Paul Saman

avcodec: force thread count to 1 when disabling due to ffmpeg-hw use.

parent 39cb8bd3
...@@ -382,12 +382,14 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -382,12 +382,14 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
{ {
msg_Warn( p_dec, "threaded frame decoding is not compatible with ffmpeg-hw, disabled" ); msg_Warn( p_dec, "threaded frame decoding is not compatible with ffmpeg-hw, disabled" );
p_sys->p_context->thread_type &= ~FF_THREAD_FRAME; p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;
p_sys->p_context->thread_count = 1;
} }
if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) && if( ( p_sys->p_context->thread_type & FF_THREAD_SLICE ) &&
( i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ) ) ( i_codec_id == CODEC_ID_MPEG1VIDEO || i_codec_id == CODEC_ID_MPEG2VIDEO ) )
{ {
msg_Warn( p_dec, "threaded slice decoding is not compatible with ffmpeg-hw, disabled" ); msg_Warn( p_dec, "threaded slice decoding is not compatible with ffmpeg-hw, disabled" );
p_sys->p_context->thread_type &= ~FF_THREAD_SLICE; p_sys->p_context->thread_type &= ~FF_THREAD_SLICE;
p_sys->p_context->thread_count = 1;
} }
#endif #endif
p_sys->p_context->get_format = ffmpeg_GetFormat; p_sys->p_context->get_format = ffmpeg_GetFormat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment