structure: error out when trying to fixate a fraction near an invalid target
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 9 Apr 2014 16:01:01 +0000 (17:01 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 08:47:59 +0000 (09:47 +0100)
gst/gststructure.c

index 91cf86f..2b78ef1 100644 (file)
@@ -2738,6 +2738,7 @@ gst_structure_fixate_field_nearest_fraction (GstStructure * structure,
 
   g_return_val_if_fail (gst_structure_has_field (structure, field_name), FALSE);
   g_return_val_if_fail (IS_MUTABLE (structure), FALSE);
+  g_return_val_if_fail (target_denominator != 0, FALSE);
 
   value = gst_structure_get_value (structure, field_name);