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 381243 - No checks are made when converting from gst.Fraction to GValue
No checks are made when converting from gst.Fraction to GValue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal major
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-01 12:03 UTC by Edward Hervey
Modified: 2007-03-01 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (1.80 KB, patch)
2006-12-01 12:04 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2006-12-01 12:03:51 UTC
Currently no checks are made to make sure the values of the python gst.Fraction object can actually fit properly in a GstFraction GValue.

The following patch checks that the values are correct, and simplifies the values of gst.Fraction before.
Comment 1 Edward Hervey 2006-12-01 12:04:22 UTC
Created attachment 77482 [details] [review]
fix
Comment 2 Edward Hervey 2007-03-01 14:25:42 UTC
2007-03-01  Edward Hervey  <edward@fluendo.com>

	* gst/__init__.py:
	Added __eq__ method to fractions so we can check if two fractions are
	equal.
	* gst/pygstvalue.c: (my_gcd), (pygst_value_from_pyobject):
	Attempt to simplify gst.Fraction before filling in a GValue.
	Fixes #381243