From a8d43712da264a324508598bb1d4b20fd60d2699 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 4 May 2008 14:25:07 +0000 Subject: [PATCH] gst/gstclock.c: Make some checks actually useful. 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 | 8 ++++++++ gst/gstclock.c | 4 ++-- gst/gstregistrybinary.c | 10 ---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index aad73d4..e225302 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-04 Sebastian Dröge + + * 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 * gst/gstminiobject.c: (gst_value_get_mini_object): diff --git a/gst/gstclock.c b/gst/gstclock.c index e7a8074..5633bc7 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -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); diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 850e1bd..a9cc3e0 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -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 */ -- 2.7.4