| 4845 | } |
| 4846 | |
| 4847 | static void job_clean( hb_job_t * job ) |
| 4848 | { |
| 4849 | if (job) |
| 4850 | { |
| 4851 | hb_chapter_t *chapter; |
| 4852 | hb_audio_t *audio; |
| 4853 | hb_subtitle_t *subtitle; |
| 4854 | hb_filter_object_t *filter; |
| 4855 | hb_attachment_t *attachment; |
| 4856 | |
| 4857 | free((void*)job->json); |
| 4858 | job->json = NULL; |
| 4859 | free(job->encoder_preset); |
| 4860 | job->encoder_preset = NULL; |
| 4861 | free(job->encoder_tune); |
| 4862 | job->encoder_tune = NULL; |
| 4863 | free(job->encoder_options); |
| 4864 | job->encoder_options = NULL; |
| 4865 | free(job->encoder_profile); |
| 4866 | job->encoder_profile = NULL; |
| 4867 | free(job->encoder_level); |
| 4868 | job->encoder_level = NULL; |
| 4869 | free(job->file); |
| 4870 | job->file = NULL; |
| 4871 | |
| 4872 | hb_data_close(&job->extradata); |
| 4873 | |
| 4874 | // clean up chapter list |
| 4875 | while( ( chapter = hb_list_item( job->list_chapter, 0 ) ) ) |
| 4876 | { |
| 4877 | hb_list_rem( job->list_chapter, chapter ); |
| 4878 | hb_chapter_close( &chapter ); |
| 4879 | } |
| 4880 | hb_list_close( &job->list_chapter ); |
| 4881 | |
| 4882 | // clean up audio list |
| 4883 | while( ( audio = hb_list_item( job->list_audio, 0 ) ) ) |
| 4884 | { |
| 4885 | hb_list_rem( job->list_audio, audio ); |
| 4886 | hb_audio_close( &audio ); |
| 4887 | } |
| 4888 | hb_list_close( &job->list_audio ); |
| 4889 | |
| 4890 | // clean up subtitle list |
| 4891 | while( ( subtitle = hb_list_item( job->list_subtitle, 0 ) ) ) |
| 4892 | { |
| 4893 | hb_list_rem( job->list_subtitle, subtitle ); |
| 4894 | hb_subtitle_close( &subtitle ); |
| 4895 | } |
| 4896 | hb_list_close( &job->list_subtitle ); |
| 4897 | |
| 4898 | // clean up filter list |
| 4899 | while( ( filter = hb_list_item( job->list_filter, 0 ) ) ) |
| 4900 | { |
| 4901 | hb_list_rem( job->list_filter, filter ); |
| 4902 | hb_filter_close( &filter ); |
| 4903 | } |
| 4904 | hb_list_close( &job->list_filter ); |
no test coverage detected