[vlc-commits] vlm: set log header on media object

Rémi Denis-Courmont git at videolan.org
Wed Feb 20 16:36:11 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 19 22:03:47 2019 +0200| [f6bde60d6849b9e818e92bb4e64fcd89af5ce561] | committer: Rémi Denis-Courmont

vlm: set log header on media object

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

 src/input/vlm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/input/vlm.c b/src/input/vlm.c
index ca5821b10b..54985547e4 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -753,6 +753,14 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
     if( !p_media )
         return VLC_ENOMEM;
 
+    if( asprintf( &p_media->obj.header, _("Media: %s"),
+                  p_cfg->psz_name ) == -1 )
+    {
+        p_media->obj.header = NULL;
+        vlc_object_release( p_media );
+        return VLC_ENOMEM;
+    }
+
     vlm_media_Copy( &p_media->cfg, p_cfg );
     p_media->cfg.id = p_vlm->i_id++;
     /* FIXME do we do something here if enabled is true ? */



More information about the vlc-commits mailing list