mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
wpesrc: fix some caps leaks using the non-GL output
Always chain up to the parent _stop() implementation as it unrefs some caps (among other things). Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1409 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1618>
This commit is contained in:
parent
f7a8ece5ef
commit
b003387526
1 changed files with 11 additions and 6 deletions
|
@ -330,15 +330,20 @@ gst_wpe_src_stop (GstBaseSrc * base_src)
|
|||
{
|
||||
GstWpeSrc *src = GST_WPE_SRC (base_src);
|
||||
|
||||
/* we can call this always, GstGLBaseSrc is smart enough to not crash if
|
||||
* gst_gl_base_src_gl_start() has not been called from chaining up
|
||||
* gst_wpe_src_decide_allocation() */
|
||||
if (!GST_CALL_PARENT_WITH_DEFAULT(GST_BASE_SRC_CLASS, stop, (base_src), FALSE))
|
||||
return FALSE;
|
||||
|
||||
GST_OBJECT_LOCK (src);
|
||||
|
||||
if (src->gl_enabled) {
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
// Let glbasesrc call our gl_stop() within its GL context.
|
||||
return GST_CALL_PARENT_WITH_DEFAULT(GST_BASE_SRC_CLASS, stop, (base_src), FALSE);
|
||||
}
|
||||
|
||||
/* if gl-enabled, gst_wpe_src_stop_unlocked() would have already been called
|
||||
* inside gst_wpe_src_gl_stop() from the base class stopping the OpenGL
|
||||
* context */
|
||||
if (!src->gl_enabled)
|
||||
gst_wpe_src_stop_unlocked (src);
|
||||
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue