From 9c2379e00aa4dc4ed8a8d84303f5a1bc2333f0ca Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Wed, 23 Jan 2019 12:50:40 +0100 Subject: [PATCH] glupload: prevent segfault when updating caps When the glupload element renegotiates the caps, set_caps will reset the method_impl to NULL, but the method will be kept. transform_caps tries to use the method_impl to transform the caps, because a method is set, but will segfault. --- gst-libs/gst/gl/gstglupload.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index c10c0230f5..bf6b62d3f4 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -1869,6 +1869,7 @@ _gst_gl_upload_set_caps_unlocked (GstGLUpload * upload, GstCaps * in_caps, gst_video_info_from_caps (&upload->priv->in_info, in_caps); gst_video_info_from_caps (&upload->priv->out_info, out_caps); + upload->priv->method = NULL; upload->priv->method_impl = NULL; upload->priv->method_i = 0;