[Bug 723236] caps: fix gst_caps_get_features return

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 29 11:32:00 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=723236
  GStreamer | gstreamer (core) | git

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #267523|none                        |needs-work
             status|                            |

--- Comment #4 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-01-29 19:31:53 UTC ---
Review of attachment 267523:
 --> (https://bugzilla.gnome.org/review?bug=723236&attachment=267523)

::: gst/gstcaps.c
@@ +857,3 @@

+  storage = &gst_caps_get_features_unchecked (caps, index);
+  features = *storage;

Why do you do this dance with & and the ** here? That does not seem to do
anything useful at all other than being confusing :) Just add the capsfeatures
with the normal API.

Also you can't just add the capsfeatures to the caps because the caps might not
be writable. So many threads could call this at the same time and weird things
could happen.

I don't have a better idea though, the way this function works now is not very
useful.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list