Lynne:
Sent: 2021年11月24日 18:36
To: FFmpeg development discussions and patches<mailto:ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 4/4] avutil/hwcontext_vulkan: fully 
support customizable validation layers

24 Nov 2021, 05:11 by jianhua...@intel.com:

>>  /* Creates a VkInstance */
>>  static int create_instance(AVHWDeviceContext *ctx, AVDictionary *opts)
>>  {
>> @@ -558,13 +651,16 @@ static int create_instance(AVHWDeviceContext *ctx, 
>> AVDictionary *opts)
>>  /* Check for present/missing extensions */
>>  err = check_extensions(ctx, 0, opts, &inst_props.ppEnabledExtensionNames,
>>  &inst_props.enabledExtensionCount, debug_mode);
>> +    hwctx->enabled_inst_extensions = inst_props.ppEnabledExtensionNames;
>> +    hwctx->nb_enabled_inst_extensions = inst_props.enabledExtensionCount;
>>
>
> Why did you move that assignment?
>

If the creation fails or something exception, assign them here to ensure
that they could be released in the vulkan_device_free() just like releasing
by a de-constructor, and it's no need to write more codes to free them in
this function. If the context creation failed, the vulkan_device_free() will
be called immediately, so they would not keep for a long time.

>
> I've pushed patches 2 and 3, just squash patch 1 and 4 (this one) and
> resubmit with the changes I mentioned.
>

Okay. No problem. I’ll resubmit it.

Thanks,
Jianhua

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to