void dc_audio_input_data_destroy(AudioInputData *audio_input_data) { int i; if (audio_input_data->circular_buf.list) { for (i = 0; i < AUDIO_CB_SIZE; i++) { AudioDataNode *audio_data_node = (AudioDataNode*)audio_input_data->circular_buf.list[i].data; gf_free(audio_data_node->abuf); gf_free(audio_data_node); } } dc_circular_buffer_destroy(&audio_input_data->circular_buf); }
void dc_video_input_data_destroy(VideoInputData *video_input_data) { int i; for (i=0; i<(int) video_input_data->circular_buf.size; i++) { if (video_input_data->circular_buf.list) { VideoDataNode *video_data_node = (VideoDataNode*)video_input_data->circular_buf.list[i].data; av_free(video_data_node->vframe); gf_free(video_data_node); } } dc_circular_buffer_destroy(&video_input_data->circular_buf); gf_free(video_input_data->vprop); }
int dc_video_scaler_data_destroy(VideoScaledData *video_scaled_data) { int i; for (i=0; i<(int) video_scaled_data->circular_buf.size; i++) { if (video_scaled_data->circular_buf.list) { dc_video_scaler_node_destroy(video_scaled_data->circular_buf.list[i].data); } } for (i=0 ; i<video_scaled_data->num_producers; i++) { if (video_scaled_data->vsprop[i].sws_ctx) av_free(video_scaled_data->vsprop[i].sws_ctx); } gf_free(video_scaled_data->vsprop); //av_free(video_scaled_data->sws_ctx); dc_circular_buffer_destroy(&video_scaled_data->circular_buf); return 0; }