[vlc-commits] transcode: don't crash with threads with freeing pictures all over

Ilkka Ollakka git at videolan.org
Sat Nov 16 19:48:26 CET 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Nov 16 20:33:16 2013 +0200| [2f9b33af5b50e6a16b332f1334d256a1e9bc0705] | committer: Ilkka Ollakka

transcode: don't crash with threads with freeing pictures all over

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f9b33af5b50e6a16b332f1334d256a1e9bc0705
---

 modules/stream_out/transcode/video.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index e33de42..ea4bfca 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -728,7 +728,7 @@ static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream
 
     if( p_sys->i_threads )
     {
-        if( unlikely (p_sys->b_master_sync && b_need_duplicate ))
+        if( p_sys->b_master_sync )
         {
             p_pic2 = video_new_buffer_encoder( id->p_encoder );
             if( likely( p_pic2 != NULL ) )
@@ -772,7 +772,7 @@ static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream
                            ( date_Get( &id->interpolated_pts ) );
     }
 
-    if( p_sys->i_threads > 0 )
+    if( p_sys->i_threads && p_sys->b_master_sync && p_pic2 )
         picture_Release( p_pic2 );
     else
         picture_Release( p_pic );



More information about the vlc-commits mailing list