summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2023-05-10 00:51:31 +0900
committerTim-Philipp Müller <tim@centricular.com>2023-05-11 01:29:37 +0100
commit850c57bad75850907e7eb57b0df8e5f917b1275b (patch)
tree885ae25356699484e698f9bd7bfe2e6e116fda47
parent43461432ec1af623d2b6f58693868023d9bf7288 (diff)
downloadgstreamer-850c57bad75850907e7eb57b0df8e5f917b1275b.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4596>
-rw-r--r--subprojects/gst-plugins-bad/sys/d3d11/gstd3d11videosink.cpp4
1 files 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;
}