[vlc-devel] commit: INPUT: Properly remove SDT and EPG entries on exit ( Marian Ďurkovič )

git version control git at videolan.org
Mon Sep 14 16:52:55 CEST 2009


vlc | branch: master | Marian Ďurkovič <md at bts.sk> | Mon Sep 14 16:52:31 2009 +0200| [6fc6b16d506665d3ee4ede58c444de68491a61bc] | committer: Marian Ďurkovič 

INPUT: Properly remove SDT and EPG entries on exit

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

 src/input/es_out.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 500f49d..ab4b589 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -331,6 +331,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
 static void EsOutDelete( es_out_t *out )
 {
     es_out_sys_t *p_sys = out->p_sys;
+    input_thread_t *p_input = p_sys->p_input;
     int i;
 
     if( p_sys->p_sout_record )
@@ -366,6 +367,18 @@ static void EsOutDelete( es_out_t *out )
     {
         es_out_pgrm_t *p_pgrm = p_sys->pgrm[i];
         input_clock_Delete( p_pgrm->p_clock );
+
+        /* Remove SDT and EPG entries */
+        char *psz_cat = EsOutProgramGetMetaName( p_pgrm );
+        input_Control( p_input, INPUT_DEL_INFO, psz_cat, NULL );
+        char *psz_epg;
+        if( asprintf( &psz_epg, "EPG %s", psz_cat ) >= 0 )
+        {
+            input_Control( p_input, INPUT_DEL_INFO, psz_epg, NULL );
+            free( psz_epg );
+        }
+        free( psz_cat );
+
         free( p_pgrm->psz_now_playing );
         free( p_pgrm->psz_publisher );
         free( p_pgrm->psz_name );




More information about the vlc-devel mailing list