vlc | branch: master | Francois Cartegnie <[email protected]> | Tue Dec 20 14:00:58 2016 +0100| [fb11b15528ffa8e773c610ad30448a74403746d4] | committer: Francois Cartegnie
es_out: update input only from current program > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb11b15528ffa8e773c610ad30448a74403746d4 --- include/vlc_epg.h | 2 +- src/input/es_out.c | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/vlc_epg.h b/include/vlc_epg.h index c4ff661..5703c90 100644 --- a/include/vlc_epg.h +++ b/include/vlc_epg.h @@ -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 */ diff --git a/src/input/es_out.c b/src/input/es_out.c index 10e9627..512cfd4 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -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 ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
