mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
vkencoder-private: check for codec buffer
gst_vulkan_video_codec_buffer_new() can return NULL, so it's required to check the returned value and bail out if needed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
This commit is contained in:
parent
d9e9d2ff72
commit
75a6ddf2be
1 changed files with 4 additions and 0 deletions
|
@ -414,6 +414,10 @@ gst_vulkan_encoder_picture_init (GstVulkanEncoderPicture * pic,
|
|||
pic->out_buffer =
|
||||
gst_vulkan_video_codec_buffer_new (self->queue->device, &priv->profile,
|
||||
VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR, size_aligned);
|
||||
if (!pic->out_buffer) {
|
||||
gst_clear_buffer (&pic->dpb_buffer);
|
||||
return FALSE;
|
||||
}
|
||||
pic->slotIndex = -1;
|
||||
pic->offset = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue