Commit 21edd87a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

TS demux: fix memory leak using ACCESS_SET_PRIVATE_ID_CA

If the access does not support CAM, we need to free the PMT
(closes #3163)
parent 19a97d79
...@@ -577,7 +577,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -577,7 +577,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
b_bool = (bool)va_arg( args, int ); b_bool = (bool)va_arg( args, int );
break; break;
case ACCESS_SET_PRIVATE_ID_CA: /* 12 -From Demux */ case ACCESS_SET_PRIVATE_ID_CA: /* 12 -From Demux */
break; return VLC_EGENERIC;
default: default:
msg_Warn( p_access, msg_Warn( p_access,
"DVB_Control: Unimplemented query in control %d", i_query ); "DVB_Control: Unimplemented query in control %d", i_query );
......
...@@ -4133,16 +4133,11 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt ) ...@@ -4133,16 +4133,11 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
} }
} }
if( ProgramIsSelected( p_demux, prg->i_number ) ) /* Set CAM descrambling */
{ if( !ProgramIsSelected( p_demux, prg->i_number )
/* Set CAM descrambling */ || stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS, ACCESS_SET_PRIVATE_ID_CA, p_pmt ) != VLC_SUCCESS )
ACCESS_SET_PRIVATE_ID_CA, p_pmt );
}
else
{
dvbpsi_DeletePMT( p_pmt ); dvbpsi_DeletePMT( p_pmt );
}
for( int i = 0; i < i_clean; i++ ) for( int i = 0; i < i_clean; i++ )
{ {
......
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