[FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: dynamically load functions

Chen, Wenbin wenbin.chen at intel.com
Thu Jun 10 04:38:04 EEST 2021


> Jun 8, 2021, 07:38 by wenbin.chen at intel.com:
> 
> >> Apr 29, 2021, 03:52 by dev at lynne.ee:
> >>
> >> > This patch allows for alternative loader implementations.
> >> >
> >> > Patch attached.
> >> >
> >>
> >> Forgot to fix a flag, v2 attached.
> >>
> >
> > Hi Lynne:
> > I tried the following command:
> > "ffmpeg -init_hw_device vulkan=vul:0 -filter_hw_device vul -i 1080p.264 -vf
> "hwupload=extra_hw_frames=16,scale_vulkan=w=1920:h1080" -f null"
> > It report a segmentation fault at
> https://github.com/FFmpeg/FFmpeg/blob/282b9f4cba7ca361c43ac9f94031a
> 43109df0a4f/libavutil/hwcontext_vulkan.c#L1018
> > The function pointer vk->CreateCommandPool is NULL.
> > I build on ffmpeg master.
> >
> 
> Weird. What Vulkan drivers and what OS was used?
> If CreateCommandPool is NULL then initialization probably
> wouldn't even happen.

I use linux ubuntu 20.04 and I get the vulkan driver from: https://www.lunarg.com/vulkan-sdk/.
I see the load_functions() is called three times, but none of them set "has_dev" argument to 1.
I tried to change the code in https://github.com/FFmpeg/FFmpeg/blob/591b88e6787c4e678237f02a50421d101abd25c2/libavutil/hwcontext_vulkan.c#L1352  to "load_functions(ctx, 1, 1)". The problem is unseen.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list