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

git version control git at videolan.org
Tue Sep 15 08:33:42 CEST 2009


vlc | branch: 1.0-bugfix | Marian Ďurkovič <md at bts.sk> | Mon Sep 14 16:52:31 2009 +0200| [cdbb7e2d9594c6a1836f1bf35626a24f4294d1de] | committer: Marian Ďurkovič 

INPUT: Properly remove SDT and EPG entries on exit
(cherry picked from commit 6fc6b16d506665d3ee4ede58c444de68491a61bc)

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

 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 040365d..b67aa36 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -329,6 +329,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 )
@@ -364,6 +365,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