After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647857 - [xvimagesink/ximagesink] Handle NULL caps in buffer_alloc()
[xvimagesink/ximagesink] Handle NULL caps in buffer_alloc()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-15 10:48 UTC by Sebastian Dröge (slomo)
Modified: 2011-04-18 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: Check if valid caps are passed to gst_pad_alloc_buffer() (976 bytes, patch)
2011-04-15 10:49 UTC, Sebastian Dröge (slomo)
rejected Details | Review

Description Sebastian Dröge (slomo) 2011-04-15 10:48:57 UTC
See attached patch. Elements are currently assuming that the caps are not NULL and fixed and will explode otherwise, for example xvimagesink (see bug #647854).


Another solution would be, to use GST_PAD_CAPS() if NULL is passed and if GST_PAD_CAPS() is not NULL, I'll attach a patch for this too.
Comment 1 Sebastian Dröge (slomo) 2011-04-15 10:49:18 UTC
Created attachment 186015 [details] [review]
pad: Check if valid caps are passed to gst_pad_alloc_buffer()
Comment 2 Sebastian Dröge (slomo) 2011-04-15 10:51:41 UTC
No, I won't attach a patch for the second solution. IMHO the attached patch is the right thing to do and using GST_PAD_CAPS() will make the code ugly (need to take a ref of the caps and only unref them if GST_PAD_CAPS was used later).
Comment 3 Sebastian Dröge (slomo) 2011-04-18 09:26:28 UTC
Comment on attachment 186015 [details] [review]
pad: Check if valid caps are passed to gst_pad_alloc_buffer()

NULL caps need to be allowed because of elements that don't need any caps, like filesrc/fakesink
Comment 4 Sebastian Dröge (slomo) 2011-04-18 09:27:17 UTC
commit 75c337c72607892129de7f765c7410e8b7eec131
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Apr 18 11:24:57 2011 +0200

    x(v)imagesink: If NULL caps are passed to buffer_alloc() do fallback allocation
    
    Fixes bug #647857.