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)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 12 Apr 2014 11:22:24 +0000 (12:22 +0100)
gst/gststructure.c

index f164d163dfc7da76a751006efb9d726178480d12..48b7031a42fad88cffae77b1cc03ea584970f518 100644 (file)
@@ -2665,6 +2665,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);