[vlc-commits] avcodec: don't flush if codec is not opened
Thomas Guillem
git at videolan.org
Tue Aug 30 10:56:28 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 30 10:55:33 2016 +0200| [926eb5ec2d66d6dede1799f8d8ab10ff5b209b92] | committer: Thomas Guillem
avcodec: don't flush if codec is not opened
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=926eb5ec2d66d6dede1799f8d8ab10ff5b209b92
---
modules/codec/avcodec/video.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 0c10f9e..05a4d61 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -575,7 +575,9 @@ static void Flush( decoder_t *p_dec )
decoder_AbortPictures( p_dec, true );
post_mt( p_sys );
- avcodec_flush_buffers( p_context );
+ /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */
+ if( avcodec_is_open( p_context ) )
+ avcodec_flush_buffers( p_context );
wait_mt( p_sys );
/* Reset cancel state to false */
More information about the vlc-commits
mailing list