[vlc-commits] avcodec: fix deadlock when flusing (fixes #8901)
Rémi Denis-Courmont
git at videolan.org
Wed Jul 3 20:55:00 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 3 21:51:23 2013 +0300| [19c16247506f0246d4cb0a49139f4c1558892713] | committer: Rémi Denis-Courmont
avcodec: fix deadlock when flusing (fixes #8901)
avcodec_flush_buffers() may get or release frame buffers.
See also EndVideoDec().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19c16247506f0246d4cb0a49139f4c1558892713
---
modules/codec/avcodec/video.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 5338144..a6a9ab7 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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;
More information about the vlc-commits
mailing list