[vlc-commits] concat: prevent infinite recursion

Rémi Denis-Courmont git at videolan.org
Tue Jul 28 17:38:09 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 28 18:14:31 2015 +0300| [2dbeba48d557aba527e05362c93d28d42d2d1aac] | committer: Rémi Denis-Courmont

concat: prevent infinite recursion

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

 modules/access/concat.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/access/concat.c b/modules/access/concat.c
index 595fa2b..c008619 100644
--- a/modules/access/concat.c
+++ b/modules/access/concat.c
@@ -214,7 +214,7 @@ static int Open(vlc_object_t *obj)
 {
     access_t *access = (access_t *)obj;
 
-    char *list = var_InheritString(access, "concat-list");
+    char *list = var_CreateGetNonEmptyString(access, "concat-list");
     if (list == NULL)
         return VLC_EGENERIC;
 
@@ -225,6 +225,8 @@ static int Open(vlc_object_t *obj)
         return VLC_ENOMEM;
     }
 
+    var_SetString(access, "concat-list", ""); /* prevent recursion */
+
     bool read_cb = true;
 
     sys->access = NULL;
@@ -318,6 +320,7 @@ static void Close(vlc_object_t *obj)
         free(e);
     }
 
+    var_Destroy(access, "concat-list");
     free(sys);
 }
 



More information about the vlc-commits mailing list