[vlc-devel] commit: Updated current EIT event only on Current/Following EIT tables. ( Laurent Aimar )
git version control
git at videolan.org
Thu Sep 17 22:21:30 CEST 2009
vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Wed Aug 12 23:12:31 2009 +0200| [e6e42c0a7cd40693572fd604354f0e8322e0f3c7] | committer: Ilkka Ollakka
Updated current EIT event only on Current/Following EIT tables.
(cherry picked from commit 6186747ba45ca7395b4d217072d74c1c908e57a0)
Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e6e42c0a7cd40693572fd604354f0e8322e0f3c7
---
modules/demux/ts.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index b727ad9..514096b 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -2895,7 +2895,8 @@ static int EITConvertDuration( uint32_t i_duration )
#undef CVT_FROM_BCD
-static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit )
+static void EITCallBack( demux_t *p_demux,
+ dvbpsi_eit_t *p_eit, bool b_current_following )
{
demux_sys_t *p_sys = p_demux->p_sys;
dvbpsi_eit_event_t *p_evt;
@@ -3014,7 +3015,7 @@ static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit )
}
if( p_epg->i_event > 0 )
{
- if( p_eit->i_service_id == p_sys->i_current_program )
+ if( p_eit->i_service_id == p_sys->i_current_program && b_current_following )
{
p_sys->i_dvb_length = 0;
p_sys->i_dvb_start = 0;
@@ -3031,6 +3032,14 @@ static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit )
dvbpsi_DeleteEIT( p_eit );
}
+static void EITCallBackCurrentFollowing( demux_t *p_demux, dvbpsi_eit_t *p_eit )
+{
+ EITCallBack( p_demux, p_eit, true );
+}
+static void EITCallBackSchedule( demux_t *p_demux, dvbpsi_eit_t *p_eit )
+{
+ EITCallBack( p_demux, p_eit, false );
+}
static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h,
uint8_t i_table_id, uint16_t i_extension )
@@ -3054,8 +3063,10 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h,
msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)",
i_table_id, i_table_id, i_extension, i_extension );
- dvbpsi_AttachEIT( h, i_table_id, i_extension,
- (dvbpsi_eit_callback)EITCallBack, p_demux );
+ dvbpsi_eit_callback cb = i_table_id == 0x4e ?
+ (dvbpsi_eit_callback)EITCallBackCurrentFollowing :
+ (dvbpsi_eit_callback)EITCallBackSchedule;
+ dvbpsi_AttachEIT( h, i_table_id, i_extension, cb, p_demux );
}
}
#endif
More information about the vlc-devel
mailing list