inline static void ExpendChannelList( CHANNEL_LIST *pChannelList, int nExpendNum ) { CHANNEL_DAT *old_channel_p = pChannelList->channel; int total_num = pChannelList->total_list_num + nExpendNum; pChannelList->channel = SAGETV_MALLOC( total_num * sizeof(CHANNEL_DAT) ); if ( pChannelList->channel ) { if ( old_channel_p ) { memcpy( pChannelList->channel, old_channel_p, pChannelList->total_list_num * sizeof(CHANNEL_DAT) ); SAGETV_FREE( old_channel_p ); } pChannelList->total_list_num = total_num; } }
void ReleaseTSChannelParser( TS_CHANNEL_PARSER *pTSChannelParser ) { int i; if ( pTSChannelParser->program_list.program ) SAGETV_FREE( pTSChannelParser->program_list.program ); if ( pTSChannelParser->channel_list.channel ) SAGETV_FREE( pTSChannelParser->channel_list.channel ); if ( pTSChannelParser->tune_list.tune ) SAGETV_FREE( pTSChannelParser->tune_list.tune ); SAGETV_FREE( pTSChannelParser->ts_streams.ts_element ); SAGETV_FREE( pTSChannelParser->es_streams.es_element ); SAGETV_FREE( pTSChannelParser->av_streams.av_element ); for ( i = 0; i<pTSChannelParser->max_stream_num; i++ ) SAGETV_FREE( pTSChannelParser->es_buffer[i].buffer ); SAGETV_FREE( pTSChannelParser->es_buffer ); ReleaseTSFilter( pTSChannelParser->ts_filter ); SAGETV_FREE( pTSChannelParser ); SageLog(( _LOG_TRACE, 3, TEXT("TS Channel Parser is released .") )); }
void ReleaseTSInfoParser( TS_INFO_PARSER *pTSInfoParser ) { int i; SAGETV_FREE( pTSInfoParser->ts_streams.ts_element ); SAGETV_FREE( pTSInfoParser->es_streams.es_element ); SAGETV_FREE( pTSInfoParser->av_streams.av_element ); for ( i = 0; i<pTSInfoParser->max_stream_num; i++ ) SAGETV_FREE( pTSInfoParser->es_buffer[i].buffer ); SAGETV_FREE( pTSInfoParser->es_buffer ); ReleaseTSFilter( pTSInfoParser->ts_filter ); SAGETV_FREE( pTSInfoParser ); SageLog(( _LOG_TRACE, 3, TEXT("TS Info Parser is released .") )); }
void ReleaseTracks( TRACKS* pTracks ) { SAGETV_FREE( pTracks->track ); SAGETV_FREE( pTracks ); }
static void ReleaseRemuxer( REMUXER* pRemuxer ) { ReleaseDemuxer( pRemuxer->demuxer ); SAGETV_FREE( pRemuxer ); }