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 145391 - gstvalue.c: ref klasses instead of peek
gstvalue.c: ref klasses instead of peek
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal critical
: 0.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-04 16:53 UTC by Ronald Bultje
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase + patch for gstvalue.c which makes the testcase work (4.57 KB, patch)
2004-07-05 14:56 UTC, Ronald Bultje
none Details | Review
New patch (7.32 KB, patch)
2004-07-07 03:54 UTC, Ronald Bultje
none Details | Review

Description Ronald Bultje 2004-07-04 16:53:36 UTC
gstvalue.c:1314 peeks a klass instead of reffing it. this doesn't work in at
least one of my testcases. Reffing instead of peeking does work. There's more
peeks in gstvalue.c, I guess all of them need to be moved into a ref/unref pair,
but the g_return_if_fail()s make that fairly difficult.
Comment 1 David Schleef 2004-07-04 20:59:35 UTC
I'd like to see the test case first.  This sounds like a deficiency in glib.
Comment 2 Ronald Bultje 2004-07-05 14:56:07 UTC
Created attachment 29236 [details] [review]
Testcase + patch for gstvalue.c which makes the testcase work

The provided patch includes a testcase in the testsuite. The test simply tests
adding an enum-type to a GstStructure/GstCaps, to-/from-string conversions and
asserts that the final result is as we entered in the beginning. It also
patches gst/gstvalue.c to make the testcase work by doing s/peek/ref/ plus some
more to unref as required. Without that part of the patch, the testcase fails.
Comment 3 Ronald Bultje 2004-07-07 03:54:50 UTC
Created attachment 29302 [details] [review]
New patch

This patch corrects:
* klass retrieval for enum types (serialization/deserialization)
* makes comparing of enums work
* add a test to ensure that enums in caps work

Good enough?
Comment 4 Ronald Bultje 2004-07-07 04:23:02 UTC
This one is applied now.