Commit 19c16247 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: fix deadlock when flusing (fixes #8901)

avcodec_flush_buffers() may get or release frame buffers.
See also EndVideoDec().
parent 261d8a33
......@@ -470,8 +470,10 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_sys->i_late_frames = 0;
post_mt( p_sys );
if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
avcodec_flush_buffers( p_context );
wait_mt( p_sys );
block_Release( p_block );
return NULL;
......
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