[vlc-commits] mosaic_bridge: don't use the filter chain if it wasn't created properly

Steve Lhomme git at videolan.org
Fri Jul 21 13:26:18 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Jul 19 14:16:36 2017 +0200| [4fa5ea407a7614a5ac56bf66bf9a3d3970313398] | committer: Jean-Baptiste Kempf

mosaic_bridge: don't use the filter chain if it wasn't created properly

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_out/mosaic_bridge.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 5d61f7f497..e0f9ff4c8f 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -388,13 +388,16 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p
         };
 
         p_sys->p_vf2 = filter_chain_NewVideo( p_stream, false, &owner );
-        es_format_t fmt;
-        es_format_Copy( &fmt, &p_sys->p_decoder->fmt_out );
-        if( p_sys->i_chroma )
-            fmt.video.i_chroma = p_sys->i_chroma;
-        filter_chain_Reset( p_sys->p_vf2, &fmt, &fmt );
-        es_format_Clean( &fmt );
-        filter_chain_AppendFromString( p_sys->p_vf2, psz_chain );
+        if (p_sys->p_vf2 != NULL)
+        {
+            es_format_t fmt;
+            es_format_Copy( &fmt, &p_sys->p_decoder->fmt_out );
+            if( p_sys->i_chroma )
+                fmt.video.i_chroma = p_sys->i_chroma;
+            filter_chain_Reset( p_sys->p_vf2, &fmt, &fmt );
+            es_format_Clean( &fmt );
+            filter_chain_AppendFromString( p_sys->p_vf2, psz_chain );
+        }
         free( psz_chain );
     }
     else



More information about the vlc-commits mailing list