[vlc-commits] transcode/video: don't close from process

Thomas Guillem git at videolan.org
Fri Jan 5 17:53:57 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan  5 16:42:53 2018 +0100| [196c7e5da73576a2f0841b47db339f2644bb1795] | committer: Jean-Baptiste Kempf

transcode/video: don't close from process

In case of error, just set transcode to false. Everything will be closed later.
This fixes invalid usage of closed mutexes/conds/filters.

(cherry picked from commit 83fa27fca1de78ada9bc6695cf77021629184325)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=196c7e5da73576a2f0841b47db339f2644bb1795
---

 modules/stream_out/transcode/video.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 5c4c86dacc..68fc445866 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -673,22 +673,13 @@ void transcode_video_close( sout_stream_t *p_stream,
 
     /* Close decoder */
     if( id->p_decoder->p_module )
-    {
         module_unneed( id->p_decoder, id->p_decoder->p_module );
-        id->p_decoder->p_module = NULL;
-    }
     if( id->p_decoder->p_description )
-    {
         vlc_meta_Delete( id->p_decoder->p_description );
-        id->p_decoder->p_description = NULL;
-    }
 
     /* Close encoder */
     if( id->p_encoder->p_module )
-    {
         module_unneed( id->p_encoder, id->p_encoder->p_module );
-        id->p_encoder->p_module = NULL;
-    }
 
     /* Close filters */
     if( id->p_f_chain )
@@ -837,7 +828,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
             if( transcode_video_encoder_open( p_stream, id ) != VLC_SUCCESS )
             {
                 picture_Release( p_pic );
-                transcode_video_close( p_stream, id );
                 id->b_transcode = false;
                 b_error = true;
                 continue;



More information about the vlc-commits mailing list