[vlc-commits] sout: transcode: fix wrong chain leak

Francois Cartegnie git at videolan.org
Tue Aug 27 18:11:14 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 27 16:24:53 2019 +0200| [15bf19039c0f01f91f895bb0b459e4741dd68852] | committer: Francois Cartegnie

sout: transcode: fix wrong chain leak

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

 modules/stream_out/transcode/video.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index d7e64f8afd..59c159ea45 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -287,9 +287,7 @@ static int transcode_video_set_conversions( sout_stream_t *p_stream,
                 ? &id->p_conv_nonstatic
                 : &id->p_conv_static;
 
-        id->p_conv_nonstatic = filter_chain_NewVideo( p_stream,
-                                                      step == STEP_NONSTATIC,
-                                                      &owner );
+        *pp_chain = filter_chain_NewVideo( p_stream, step == STEP_NONSTATIC, &owner );
         if( !*pp_chain )
             return VLC_EGENERIC;
         filter_chain_Reset( *pp_chain, *pp_src, p_tmpdst );
@@ -600,8 +598,8 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
         {
             /* Run filter chain */
             filter_chain_t * primary_chains[] = { id->p_f_chain,
-                                                  id->p_conv_static,
-                                                  id->p_conv_nonstatic };
+                                                  id->p_conv_nonstatic,
+                                                  id->p_conv_static };
             for( size_t i=0; p_in && i<ARRAY_SIZE(primary_chains); i++ )
             {
                 if( !primary_chains[i] )



More information about the vlc-commits mailing list