History

hwcontext_vulkan: initialize the frames context when deriving

Otherwise, the frames context is considered to be ready to handle mapping, and it doesn't get initialized the normal way through .frames_init.

Lynne committed 6 years ago

Commit b6d4bed1 parent 6bb718a1 file · +7 −0Browse files

Unified · Split

libavutil/hwcontext_vulkan.c+7−0
@@ -3251,6 +3251,12 @@ static int vulkan_transfer_data_from(AVHWFramesContext *hwfc, AVFrame *dst, · 3250 unmodified lines
3251 }3251 }
3252}3252}
3253 3253
3254static int vulkan_frames_derive_to(AVHWFramesContext *dst_fc,
3255 AVHWFramesContext *src_fc, int flags)
3256{
3257 return vulkan_frames_init(dst_fc);
3258}
3259
3254AVVkFrame *av_vk_frame_alloc(void)3260AVVkFrame *av_vk_frame_alloc(void)
3255{3261{
3256 return av_mallocz(sizeof(AVVkFrame));3262 return av_mallocz(sizeof(AVVkFrame));
@@ -3280,6 +3286,7 @@ const HWContextType ff_hwcontext_type_vulkan = { · 23 unmodified lines
3280 3286
3281 .map_to = vulkan_map_to,3287 .map_to = vulkan_map_to,
3282 .map_from = vulkan_map_from,3288 .map_from = vulkan_map_from,
3289 .frames_derive_to = &vulkan_frames_derive_to,
3283 3290
3284 .pix_fmts = (const enum AVPixelFormat []) {3291 .pix_fmts = (const enum AVPixelFormat []) {
3285 AV_PIX_FMT_VULKAN,3292 AV_PIX_FMT_VULKAN,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t