[vlc-commits] input: es_out: don't use meta from metaless programs

Francois Cartegnie git at videolan.org
Tue Jan 31 16:48:22 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 31 16:47:11 2017 +0100| [9c4f6bb41722e7d719c0122d073216470f71a8b4] | committer: Francois Cartegnie

input: es_out: don't use meta from metaless programs

refs #17933

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

 src/input/es_out.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 40e6659..490ee9c 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1058,14 +1058,17 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
     input_item_ChangeEPGSource( input_priv(p_input)->p_item, p_pgrm->i_id );
 
     /* Update now playing */
-    input_item_SetESNowPlaying( input_priv(p_input)->p_item,
-                                p_pgrm->p_meta ? vlc_meta_Get( p_pgrm->p_meta, vlc_meta_ESNowPlaying ) : NULL );
-    input_item_SetPublisher( input_priv(p_input)->p_item,
-                             p_pgrm->p_meta ? vlc_meta_Get( p_pgrm->p_meta, vlc_meta_Publisher ) : NULL);
-    input_item_SetTitle( input_priv(p_input)->p_item,
-                         p_pgrm->p_meta ? vlc_meta_Get( p_pgrm->p_meta, vlc_meta_Title ) : NULL );
-    /* FIXME: we probably want to replace every input meta */
-    input_SendEventMeta( p_input );
+    if( p_pgrm->p_meta )
+    {
+        input_item_SetESNowPlaying( input_priv(p_input)->p_item,
+                                    vlc_meta_Get( p_pgrm->p_meta, vlc_meta_ESNowPlaying ) );
+        input_item_SetPublisher( input_priv(p_input)->p_item,
+                                 vlc_meta_Get( p_pgrm->p_meta, vlc_meta_Publisher ) );
+        input_item_SetTitle( input_priv(p_input)->p_item,
+                             vlc_meta_Get( p_pgrm->p_meta, vlc_meta_Title ) );
+        input_SendEventMeta( p_input );
+        /* FIXME: we probably want to replace every input meta */
+    }
 }
 
 /* EsOutAddProgram:



More information about the vlc-commits mailing list