From ebcebe548dcaed9d5250f6c29492d8e09c74e04c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 10 May 2023 00:51:31 +0900 Subject: [PATCH] d3d11videosink: Don't clear prepared buffer on unlock_stop() That can be called between prepare() and render() which results in unexpected error flow return Part-of: --- subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp index 7a9755c72b..4fec7878ca 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp @@ -1228,8 +1228,6 @@ gst_d3d11_video_sink_unlock_stop (GstBaseSink * sink) if (self->window) gst_d3d11_window_unlock_stop (self->window); - gst_clear_buffer (&self->prepared_buffer); - return TRUE; } @@ -1442,6 +1440,8 @@ gst_d3d11_video_sink_show_frame (GstVideoSink * sink, GstBuffer * buf) ret = GST_FLOW_ERROR; } + gst_clear_buffer (&self->prepared_buffer); + return ret; }