gst/gstclock.c: Make some checks actually useful.
authorSebastian Dröge <slomo@circular-chaos.org>
Sun, 4 May 2008 14:25:07 +0000 (14:25 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Sun, 4 May 2008 14:25:07 +0000 (14:25 +0000)
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_set_calibration):
Make some checks actually useful.
* gst/gstregistrybinary.c: (gst_registry_binary_load_plugin):
Remove some unused code. Unsigned integers tend to be >= 0.

ChangeLog
gst/gstclock.c
gst/gstregistrybinary.c

index aad73d4..e225302 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-04  Sebastian Dröge  <slomo@circular-chaos.org>
+
+       * gst/gstclock.c: (gst_clock_set_calibration):
+       Make some checks actually useful.
+
+       * gst/gstregistrybinary.c: (gst_registry_binary_load_plugin):
+       Remove some unused code. Unsigned integers tend to be >= 0.
+
 2008-05-03  Tim-Philipp Müller  <tim.muller at collabora co uk>
 
        * gst/gstminiobject.c: (gst_value_get_mini_object):
index e7a8074..5633bc7 100644 (file)
@@ -932,8 +932,8 @@ gst_clock_set_calibration (GstClock * clock, GstClockTime internal, GstClockTime
     external, GstClockTime rate_num, GstClockTime rate_denom)
 {
   g_return_if_fail (GST_IS_CLOCK (clock));
-  g_return_if_fail (rate_num >= 0);
-  g_return_if_fail (rate_denom > 0);
+  g_return_if_fail (rate_num != GST_CLOCK_TIME_NONE);
+  g_return_if_fail (rate_denom > 0 && rate_denom != GST_CLOCK_TIME_NONE);
   g_return_if_fail (internal <= gst_clock_get_internal_time (clock));
 
   GST_OBJECT_LOCK (clock);
index 850e1bd..a9cc3e0 100644 (file)
@@ -994,16 +994,6 @@ gst_registry_binary_load_plugin (GstRegistry * registry, gchar ** in)
   GST_LOG ("Reading/casting for GstBinaryPluginElement at address %p", *in);
   unpack_element (*in, pe, GstBinaryPluginElement);
 
-  if (pe->nfeatures < 0) {
-    GST_ERROR ("The number of feature structure is not valid !");
-    return FALSE;
-  }
-
-  if (pe->file_mtime < 0 || pe->file_size < 0) {
-    GST_ERROR ("Plugin time or file size is not valid !");
-    return FALSE;
-  }
-
   plugin = g_object_new (GST_TYPE_PLUGIN, NULL);
 
   /* TODO: also set GST_PLUGIN_FLAG_CONST */