[vlc-commits] Qt: epg: only add current or future epg data

Francois Cartegnie git at videolan.org
Fri Apr 1 23:40:00 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr  1 23:06:22 2011 +0200| [e7806ab99145760e36784866fad29e860429cb35] | committer: Francois Cartegnie

Qt: epg: only add current or future epg data

Some channels are sending epg events from start of the day

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

 modules/gui/qt4/components/epg/EPGView.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGView.cpp b/modules/gui/qt4/components/epg/EPGView.cpp
index d166a5e..935fd22 100644
--- a/modules/gui/qt4/components/epg/EPGView.cpp
+++ b/modules/gui/qt4/components/epg/EPGView.cpp
@@ -140,6 +140,8 @@ bool EPGView::addEPGEvent( vlc_epg_event_t *data, QString channelName, bool b_cu
     bool b_refresh_channels = false;
 
     QDateTime eventStart = QDateTime::fromTime_t( data->i_start );
+    if ( eventStart.addSecs( data->i_duration ) < m_baseTime )
+        return false; /* EPG feed sent expired item */
     if ( eventStart < m_startTime )
     {
         m_startTime = eventStart;



More information about the vlc-commits mailing list