| 4002 | } |
| 4003 | |
| 4004 | static void free_input_threads(void) |
| 4005 | { |
| 4006 | int i; |
| 4007 | |
| 4008 | for (i = 0; i < nb_input_files; i++) { |
| 4009 | InputFile *f = input_files[i]; |
| 4010 | AVPacket pkt; |
| 4011 | |
| 4012 | if (!f || !f->in_thread_queue) |
| 4013 | continue; |
| 4014 | av_thread_message_queue_set_err_send(f->in_thread_queue, AVERROR_EOF); |
| 4015 | while (av_thread_message_queue_recv(f->in_thread_queue, &pkt, 0) >= 0) |
| 4016 | av_packet_unref(&pkt); |
| 4017 | |
| 4018 | pthread_join(f->thread, NULL); |
| 4019 | f->joined = 1; |
| 4020 | av_thread_message_queue_free(&f->in_thread_queue); |
| 4021 | } |
| 4022 | } |
| 4023 | |
| 4024 | static int init_input_threads(void) |
| 4025 | { |
no outgoing calls
no test coverage detected