Commit cdbb7e2d authored by Marian Ďurkovič's avatar Marian Ďurkovič

INPUT: Properly remove SDT and EPG entries on exit

(cherry picked from commit 6fc6b16d)
parent c7284a43
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment