[vlc-commits] codec: x264: avoid segfault with x264_encoder_delayed_frames
Francois Cartegnie
git at videolan.org
Tue Aug 6 22:19:21 CEST 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 6 22:12:47 2013 +0200| [4b08ccc55994b39760ee7cb1d1e3b2da076730ec] | committer: Francois Cartegnie
codec: x264: avoid segfault with x264_encoder_delayed_frames
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b08ccc55994b39760ee7cb1d1e3b2da076730ec
---
modules/codec/x264.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 14be85a..5287746 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1532,10 +1532,11 @@ static void Close( vlc_object_t *p_this )
free( p_sys->psz_stat_name );
free( p_sys->p_sei );
- msg_Dbg( p_enc, "framecount still in libx264 buffer: %d", x264_encoder_delayed_frames( p_sys->h ) );
-
if( p_sys->h )
+ {
+ msg_Dbg( p_enc, "framecount still in libx264 buffer: %d", x264_encoder_delayed_frames( p_sys->h ) );
x264_encoder_close( p_sys->h );
+ }
#ifdef PTW32_STATIC_LIB
vlc_mutex_lock( &pthread_win32_mutex );
More information about the vlc-commits
mailing list