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 )
b_bool = (bool)va_arg( args, int );
break;
case ACCESS_SET_PRIVATE_ID_CA: /* 12 -From Demux */
break;
return VLC_EGENERIC;
default:
msg_Warn( p_access,
"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 )
}
}
if( ProgramIsSelected( p_demux, prg->i_number ) )
{
/* Set CAM descrambling */
stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_CA, p_pmt );
}
else
{
/* Set CAM descrambling */
if( !ProgramIsSelected( p_demux, prg->i_number )
|| stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
ACCESS_SET_PRIVATE_ID_CA, p_pmt ) != VLC_SUCCESS )
dvbpsi_DeletePMT( p_pmt );
}
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