Commit fb11b155 authored by François Cartegnie's avatar François Cartegnie 🤞

es_out: update input only from current program

parent 7adcc671
......@@ -45,7 +45,7 @@ typedef struct
typedef struct
{
char *psz_name;
vlc_epg_event_t *p_current; /* Can be null or should be the same than one of pp_event entry */
const vlc_epg_event_t *p_current; /* Can be null or should be the same than one of pp_event entry */
uint32_t i_id; /* Unique identifier for this table / events (partial sets) */
uint16_t i_source_id;/* Channel / Program reference id this epg relates to */
......
......@@ -1386,23 +1386,25 @@ static void EsOutProgramEpg( es_out_t *out, int i_group, const vlc_epg_t *p_epg
}
vlc_mutex_unlock( &p_item->lock );
const char *psz_nowplaying = p_pgrm->p_meta ?
vlc_meta_Get( p_pgrm->p_meta, vlc_meta_ESNowPlaying ) : NULL;
/* Update selected program input info */
if( p_pgrm == p_sys->p_pgrm )
{
const char *psz_nowplaying = p_pgrm->p_meta ?
vlc_meta_Get( p_pgrm->p_meta, vlc_meta_ESNowPlaying ) : NULL;
input_item_SetESNowPlaying( input_priv(p_input)->p_item, psz_nowplaying );
input_SendEventMeta( p_input );
}
if( psz_nowplaying )
{
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
vlc_meta_TypeToLocalizedString(vlc_meta_ESNowPlaying), "%s", psz_nowplaying );
}
else
{
input_Control( p_input, INPUT_DEL_INFO, psz_cat,
vlc_meta_TypeToLocalizedString(vlc_meta_ESNowPlaying) );
if( psz_nowplaying )
{
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
vlc_meta_TypeToLocalizedString(vlc_meta_ESNowPlaying), "%s", psz_nowplaying );
}
else
{
input_Control( p_input, INPUT_DEL_INFO, psz_cat,
vlc_meta_TypeToLocalizedString(vlc_meta_ESNowPlaying) );
}
}
free( psz_cat );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment