[Bug 723236] caps: fix gst_caps_get_features return
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jan 29 14:26:36 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=723236
GStreamer | gstreamer (core) | git
--- Comment #6 from Matthieu Bouron <matthieu.bouron at collabora.com> 2014-01-29 22:26:34 UTC ---
(In reply to comment #4)
> Review of attachment 267523 [details]:
>
> ::: 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.
I reused the same method as in the gst_caps_set_features function since I
couldn't use the regular 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.
I see two solutions:
1) ensure at caps creation that a feature is set by default for each caps
structure (ie: memory:SystemMemory).
2) use some sort of locking in the get_features function.
--
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