[vlc-devel] [PATCH 06/25] vlm: don't use a variable outside of its scope

Steve Lhomme robux4 at videolabs.io
Mon Jul 10 16:52:10 CEST 2017


item.es is set to the address holding the address of es and use outside of the
code where es was declared.
---
 src/input/vlm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/vlm.c b/src/input/vlm.c
index 49ec17cfdd..df1c117e7b 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -654,6 +654,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
 
             /* XXX: Don't do it that way, but properly use a new input item ref. */
             input_item_t item = *p_media->vod.p_item;;
+            es_format_t es, *p_es = &es;
             if( p_cfg->vod.psz_mux )
             {
                 const char *psz_mux;
@@ -664,7 +665,6 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
                 else
                     psz_mux = p_cfg->vod.psz_mux;
 
-                es_format_t es, *p_es = &es;
                 union {
                     char text[5];
                     unsigned char utext[5];
-- 
2.12.1



More information about the vlc-devel mailing list