diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c index c09fa4e5ef..c35558c815 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c @@ -177,12 +177,6 @@ gst_vulkan_h264_decoder_close (GstVideoDecoder * decoder) { GstVulkanH264Decoder *self = GST_VULKAN_H264_DECODER (decoder); - if (self->decoder) - gst_vulkan_decoder_stop (self->decoder); - - if (self->output_state) - gst_video_codec_state_unref (self->output_state); - gst_clear_object (&self->decoder); gst_clear_object (&self->decode_queue); gst_clear_object (&self->graphic_queue); @@ -192,6 +186,20 @@ gst_vulkan_h264_decoder_close (GstVideoDecoder * decoder) return TRUE; } +static gboolean +gst_vulkan_h264_decoder_stop (GstVideoDecoder * decoder) +{ + GstVulkanH264Decoder *self = GST_VULKAN_H264_DECODER (decoder); + + if (self->decoder) + gst_vulkan_decoder_stop (self->decoder); + + if (self->output_state) + gst_video_codec_state_unref (self->output_state); + + return TRUE; +} + static void gst_vulkan_h264_decoder_set_context (GstElement * element, GstContext * context) { @@ -1312,6 +1320,7 @@ gst_vulkan_h264_decoder_class_init (GstVulkanH264DecoderClass * klass) decoder_class->open = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_open); decoder_class->close = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_close); + decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_stop); decoder_class->src_query = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_src_query); decoder_class->sink_query = diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c index a5390e5a81..93dbbb933a 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c @@ -235,12 +235,6 @@ gst_vulkan_h265_decoder_close (GstVideoDecoder * decoder) { GstVulkanH265Decoder *self = GST_VULKAN_H265_DECODER (decoder); - if (self->decoder) - gst_vulkan_decoder_stop (self->decoder); - - if (self->output_state) - gst_video_codec_state_unref (self->output_state); - gst_clear_object (&self->decoder); gst_clear_object (&self->decode_queue); gst_clear_object (&self->graphic_queue); @@ -250,6 +244,20 @@ gst_vulkan_h265_decoder_close (GstVideoDecoder * decoder) return TRUE; } +static gboolean +gst_vulkan_h265_decoder_stop (GstVideoDecoder * decoder) +{ + GstVulkanH265Decoder *self = GST_VULKAN_H265_DECODER (decoder); + + if (self->decoder) + gst_vulkan_decoder_stop (self->decoder); + + if (self->output_state) + gst_video_codec_state_unref (self->output_state); + + return TRUE; +} + static gboolean gst_vulkan_h265_decoder_negotiate (GstVideoDecoder * decoder) { @@ -1657,6 +1665,7 @@ gst_vulkan_h265_decoder_class_init (GstVulkanH265DecoderClass * klass) GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_sink_query); decoder_class->open = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_open); decoder_class->close = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_close); + decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_stop); decoder_class->negotiate = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_negotiate); decoder_class->decide_allocation =