GNOME Bugzilla – Bug 729542
glimagesink: pool may never be activated, which leads to crash
Last modified: 2014-05-24 20:41:26 UTC
since "gl: use the bufferpool's upload when available", it is likely that the pool upload object get used without the pool being activated. If there is no video meta, this leads to an upload->info.finfo being NULL, and mapping that frame lead to crash. I'm not sure what approach we want, we could force pool activation, or find an in between to that change. The comment says "when available", but in fact it's always using it, an error ?
Created attachment 275852 [details] [review] [PATCH] gl: Ensure buffer activatio ext/gl/gstglimagesink.c | 3 +++ 1 file changed, 3 insertions(+)
(In reply to comment #1) > Created an attachment (id=275852) [details] [review] > [PATCH] gl: Ensure buffer activatio This is in case we want to enforce buffer pool activation, note this will take a lock each time it's called (if that matters ?)
btw, to reproduce the crash: gst-launch-1.0 v4l2src ! glimagesink
commit 6f4fd7086745720c39cc1d6bfd7a1c4c845caf99 Author: Matthew Waters <ystreet00@gmail.com> Date: Wed May 7 09:11:25 2014 +1000 gl/sink: make sure we always initialize the upload object https://bugzilla.gnome.org/show_bug.cgi?id=729542
1- There is no pool of textures in gst-launch-1.0 v4l2src ! glimagesink ? 2- I guess we also need to apply this change in gstglfilter ? (gst-launch-1.0 v4l2src ! gleffects ! glimagesink) 3- Would it be better to start the gl buffer pool if not already active ? if (G_UNLIKELY (!gst_buffer_pool_is_active (pool)) { ret = gst_buffer_pool_set_active (pool); if (!ret) goto error; }
(In reply to comment #5) > 1- There is no pool of textures in gst-launch-1.0 v4l2src ! glimagesink ? No > 2- I guess we also need to apply this change in gstglfilter ? (gst-launch-1.0 > v4l2src ! gleffects ! glimagesink) No, the upload is created regardless of whether it is activated. http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglfilter.c#n1116 > 3- Would it be better to start the gl buffer pool if not already active ? > > if (G_UNLIKELY (!gst_buffer_pool_is_active (pool)) { > ret = gst_buffer_pool_set_active (pool); > if (!ret) > goto error; > } The extra textures are created/destroyed by GstGLUpload.
Thanks works, for the reference commit 6f4fd7086745720c39cc1d6bfd7a1c4c845caf99 Author: Matthew Waters <ystreet00@gmail.com> Date: Wed May 7 09:11:25 2014 +1000 gl/sink: make sure we always initialize the upload object https://bugzilla.gnome.org/show_bug.cgi?id=729542
Hey, is c2cdac278e043e091f21a6a796231dd26ec75ddd for #6 -2 ? :)
(In reply to comment #8) > Hey, is c2cdac278e043e091f21a6a796231dd26ec75ddd for #6 -2 ? :) That one fixes that same issue but in gleffects I think.