/***************************************************************************** * dvbpsi_atsc_EmptyEIT ***************************************************************************** * Clean a dvbpsi_atsc_eit_t structure. *****************************************************************************/ void dvbpsi_atsc_EmptyEIT(dvbpsi_atsc_eit_t* p_eit) { dvbpsi_atsc_eit_event_t* p_event = p_eit->p_first_event; while(p_event != NULL) { dvbpsi_atsc_eit_event_t* p_tmp = p_event->p_next; dvbpsi_DeleteDescriptors(p_event->p_first_descriptor); free(p_event); p_event = p_tmp; } p_eit->p_first_event = NULL; dvbpsi_DeleteDescriptors(p_eit->p_first_descriptor); p_eit->p_first_descriptor = NULL; }
/***************************************************************************** * dvbpsi_EmptyBAT ***************************************************************************** * Clean a dvbpsi_bat_t structure. *****************************************************************************/ void dvbpsi_EmptyBAT(dvbpsi_bat_t* p_bat) { dvbpsi_bat_ts_t* p_ts = p_bat->p_first_ts; dvbpsi_DeleteDescriptors(p_bat->p_first_descriptor); p_bat->p_first_descriptor = NULL; while (p_ts != NULL) { dvbpsi_bat_ts_t* p_tmp = p_ts->p_next; dvbpsi_DeleteDescriptors(p_ts->p_first_descriptor); free(p_ts); p_ts = p_tmp; } p_bat->p_first_ts = NULL; }
/***************************************************************************** * dvbpsi_pmt_empty ***************************************************************************** * Clean a dvbpsi_pmt_t structure. *****************************************************************************/ void dvbpsi_pmt_empty( dvbpsi_pmt_t* p_pmt ) { dvbpsi_pmt_es_t* p_es = p_pmt->p_first_es; dvbpsi_DeleteDescriptors( p_pmt->p_first_descriptor ); while ( p_es != NULL ) { dvbpsi_pmt_es_t* p_tmp = p_es->p_next; dvbpsi_DeleteDescriptors( p_es->p_first_descriptor ); free( p_es ); p_es = p_tmp; } p_pmt->p_first_descriptor = NULL; p_pmt->p_first_es = NULL; }
/***************************************************************************** * dvbpsi_nit_empty ***************************************************************************** * Clean a dvbpsi_nit_t structure. *****************************************************************************/ void dvbpsi_nit_empty(dvbpsi_nit_t* p_nit) { dvbpsi_nit_ts_t* p_ts = p_nit->p_first_ts; dvbpsi_DeleteDescriptors(p_nit->p_first_descriptor); while (p_ts != NULL) { dvbpsi_nit_ts_t* p_tmp = p_ts->p_next; dvbpsi_DeleteDescriptors(p_ts->p_first_descriptor); free(p_ts); p_ts = p_tmp; } p_nit->p_first_descriptor = NULL; p_nit->p_first_ts = NULL; }
/***************************************************************************** * dvbpsi_sis_empty ***************************************************************************** * Clean a dvbpsi_sis_t structure. *****************************************************************************/ void dvbpsi_sis_empty(dvbpsi_sis_t* p_sis) { /* FIXME: free splice_command_sections */ dvbpsi_DeleteDescriptors(p_sis->p_first_descriptor); p_sis->p_first_descriptor = NULL; /* FIXME: free alignment stuffing */ }
/***************************************************************************** * dvbpsi_atsc_EmptyETT ***************************************************************************** * Clean a dvbpsi_atsc_ett_t structure. *****************************************************************************/ void dvbpsi_atsc_EmptyETT(dvbpsi_atsc_ett_t *p_ett) { assert(p_ett); dvbpsi_DeleteDescriptors(p_ett->p_first_descriptor); free(p_ett->p_etm_data); p_ett->i_etm_length = 0; p_ett->p_etm_data = NULL; p_ett->p_first_descriptor = NULL; }
/***************************************************************************** * dvbpsi_EmptyVCT ***************************************************************************** * Clean a dvbpsi_vct_t structure. *****************************************************************************/ void dvbpsi_EmptyVCT(dvbpsi_vct_t* p_vct) { dvbpsi_vct_channel_t* p_channel = p_vct->p_first_channel; if (p_channel == NULL) return; dvbpsi_DeleteDescriptors(p_channel->p_first_descriptor); while(p_channel != NULL) { dvbpsi_vct_channel_t* p_tmp = p_channel->p_next; if (p_tmp) dvbpsi_DeleteDescriptors(p_tmp->p_first_descriptor); free(p_channel); p_channel = p_tmp; } p_vct->p_first_channel = NULL; }
/***************************************************************************** * dvbpsi_EmptyCAT ***************************************************************************** * Clean a dvbpsi_cat_t structure. *****************************************************************************/ void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat) { dvbpsi_DeleteDescriptors(p_cat->p_first_descriptor); p_cat->p_first_descriptor = NULL; }
/***************************************************************************** * dvbpsi_tot_empty ***************************************************************************** * Clean a dvbpsi_tot_t structure. *****************************************************************************/ void dvbpsi_tot_empty(dvbpsi_tot_t* p_tot) { dvbpsi_DeleteDescriptors(p_tot->p_first_descriptor); p_tot->p_first_descriptor = NULL; }