| 895 | } |
| 896 | |
| 897 | static int dec_thread_init(DecThreadContext *dt) |
| 898 | { |
| 899 | memset(dt, 0, sizeof(*dt)); |
| 900 | |
| 901 | dt->frame = av_frame_alloc(); |
| 902 | if (!dt->frame) |
| 903 | goto fail; |
| 904 | |
| 905 | dt->pkt = av_packet_alloc(); |
| 906 | if (!dt->pkt) |
| 907 | goto fail; |
| 908 | |
| 909 | return 0; |
| 910 | |
| 911 | fail: |
| 912 | dec_thread_uninit(dt); |
| 913 | return AVERROR(ENOMEM); |
| 914 | } |
| 915 | |
| 916 | static int decoder_thread(void *arg) |
| 917 | { |
no test coverage detected