eglglessink: Also unref current caps after usage
This commit is contained in:
parent
c2de59b19c
commit
aa463f0274
@ -1084,6 +1084,11 @@ gst_eglglessink_stop (GstBaseSink * sink)
|
|||||||
eglglessink->have_window = FALSE;
|
eglglessink->have_window = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eglglessink->current_caps) {
|
||||||
|
gst_caps_unref (eglglessink->current_caps);
|
||||||
|
eglglessink->current_caps = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2112,7 +2117,8 @@ gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||||||
if (gst_caps_can_intersect (caps, eglglessink->current_caps)) {
|
if (gst_caps_can_intersect (caps, eglglessink->current_caps)) {
|
||||||
GST_INFO_OBJECT (eglglessink, "Caps are compatible anyway");
|
GST_INFO_OBJECT (eglglessink, "Caps are compatible anyway");
|
||||||
goto SUCCEED;
|
goto SUCCEED;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (eglglessink, "Caps are not compatible, reconfiguring");
|
GST_DEBUG_OBJECT (eglglessink, "Caps are not compatible, reconfiguring");
|
||||||
if (eglglessink->rendering_path == GST_EGLGLESSINK_RENDER_SLOW) {
|
if (eglglessink->rendering_path == GST_EGLGLESSINK_RENDER_SLOW) {
|
||||||
glDeleteBuffers (1, &eglglessink->vdata);
|
glDeleteBuffers (1, &eglglessink->vdata);
|
||||||
@ -2140,7 +2146,11 @@ gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||||||
eglDestroyContext (eglglessink->display, eglglessink->context);
|
eglDestroyContext (eglglessink->display, eglglessink->context);
|
||||||
eglglessink->context = NULL;
|
eglglessink->context = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
g_mutex_lock (eglglessink->flow_lock);
|
||||||
|
gst_caps_unref (eglglessink->current_caps);
|
||||||
|
eglglessink->current_caps = NULL;
|
||||||
|
g_mutex_unlock (eglglessink->flow_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_eglglessink_choose_config (eglglessink)) {
|
if (!gst_eglglessink_choose_config (eglglessink)) {
|
||||||
|
@ -125,7 +125,6 @@ struct _GstEglGlesSink
|
|||||||
GstVideoSink videosink;
|
GstVideoSink videosink;
|
||||||
GstVideoFormat format;
|
GstVideoFormat format;
|
||||||
GstCaps *current_caps;
|
GstCaps *current_caps;
|
||||||
GstPad *sink;
|
|
||||||
|
|
||||||
GstVideoRectangle display_region;
|
GstVideoRectangle display_region;
|
||||||
GList *supported_fmts;
|
GList *supported_fmts;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user