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
32513251 }
32523252 }
32533253
3254+static int vulkan_frames_derive_to(AVHWFramesContext *dst_fc,
3255+ AVHWFramesContext *src_fc, int flags)
3256+{
3257+ return vulkan_frames_init(dst_fc);
3258+}
3259+
32543260 AVVkFrame *av_vk_frame_alloc(void)
32553261 {
32563262 return av_mallocz(sizeof(AVVkFrame));
@@ -3280,6 +3286,7 @@ const HWContextType ff_hwcontext_type_vulkan = { · 23 unmodified lines
32803286
32813287 .map_to = vulkan_map_to,
32823288 .map_from = vulkan_map_from,
3289+ .frames_derive_to = &vulkan_frames_derive_to,
32833290
32843291 .pix_fmts = (const enum AVPixelFormat []) {
32853292 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