| 4869 | } |
| 4870 | |
| 4871 | AVVkFrame *av_vk_frame_alloc(void) |
| 4872 | { |
| 4873 | int err; |
| 4874 | AVVkFrame *f = av_mallocz(sizeof(AVVkFrame)); |
| 4875 | if (!f) |
| 4876 | return NULL; |
| 4877 | |
| 4878 | f->internal = av_mallocz(sizeof(*f->internal)); |
| 4879 | if (!f->internal) { |
| 4880 | av_free(f); |
| 4881 | return NULL; |
| 4882 | } |
| 4883 | |
| 4884 | err = pthread_mutex_init(&f->internal->update_mutex, NULL); |
| 4885 | if (err != 0) { |
| 4886 | av_free(f->internal); |
| 4887 | av_free(f); |
| 4888 | return NULL; |
| 4889 | } |
| 4890 | |
| 4891 | return f; |
| 4892 | } |
| 4893 | |
| 4894 | const HWContextType ff_hwcontext_type_vulkan = { |
| 4895 | .type = AV_HWDEVICE_TYPE_VULKAN, |
no test coverage detected