MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_vk_frame_alloc

Function av_vk_frame_alloc

libavutil/hwcontext_vulkan.c:4871–4892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4869}
4870
4871AVVkFrame *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
4894const HWContextType ff_hwcontext_type_vulkan = {
4895 .type = AV_HWDEVICE_TYPE_VULKAN,

Callers 2

create_frameFunction · 0.70

Calls 3

av_malloczFunction · 0.70
av_freeFunction · 0.70
pthread_mutex_initFunction · 0.50

Tested by

no test coverage detected