| 839 | } |
| 840 | |
| 841 | static int enc_thread_init(EncoderThread *et) |
| 842 | { |
| 843 | memset(et, 0, sizeof(*et)); |
| 844 | |
| 845 | et->frame = av_frame_alloc(); |
| 846 | if (!et->frame) |
| 847 | goto fail; |
| 848 | |
| 849 | et->pkt = av_packet_alloc(); |
| 850 | if (!et->pkt) |
| 851 | goto fail; |
| 852 | |
| 853 | return 0; |
| 854 | |
| 855 | fail: |
| 856 | enc_thread_uninit(et); |
| 857 | return AVERROR(ENOMEM); |
| 858 | } |
| 859 | |
| 860 | int encoder_thread(void *arg) |
| 861 | { |
no test coverage detected