glupload: create the GstGLUpload object in ::transform_caps
authorAlessandro Decina <alessandro.d@gmail.com>
Mon, 5 Sep 2016 04:44:24 +0000 (14:44 +1000)
committerAlessandro Decina <alessandro.d@gmail.com>
Mon, 5 Sep 2016 04:44:24 +0000 (14:44 +1000)
commitc16d57cc9a64f1aeaa20ac079feb21f33893224d
tree182d092e9e8ca738e12d526b8477b3075998041a
parent35d147930d5ab1c3549e4413202954f21a7db0fa
glupload: create the GstGLUpload object in ::transform_caps

Previously it was created in the init function and destroyed in ::stop, which
lead to segfaults when reusing the element.

Now the upload object is created in ::transform_caps if it is NULL, which is the
earliest we need it. The other vfuncs already bail out if the upload object is
NULL, which means that negotiation wasn't done.
ext/gl/gstgluploadelement.c