gst/gstelement.c: add failure check
authorBenjamin Otte <otte@gnome.org>
Mon, 7 Jun 2004 01:01:04 +0000 (01:01 +0000)
committerBenjamin Otte <otte@gnome.org>
Mon, 7 Jun 2004 01:01:04 +0000 (01:01 +0000)
Original commit message from CVS:
* gst/gstelement.c: (gst_element_set_time_delay):
add failure check
* gst/gstinfo.h:
put brackets around macro arguments of GST_TIME_ARGS, add note to
move it to correct header in 0.9

ChangeLog
gst/gstelement.c
gst/gstinfo.h

index 4376e19..17a734a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2004-06-07  Benjamin Otte  <otte@gnome.org>
 
+       * gst/gstelement.c: (gst_element_set_time_delay):
+         add failure check
+       * gst/gstinfo.h:
+         put brackets around macro arguments of GST_TIME_ARGS, add note to
+         move it to correct header in 0.9
+
+2004-06-07  Benjamin Otte  <otte@gnome.org>
+
        * gst/indexers/gstfileindex.c: (gst_file_index_get_writer_id),
        (gst_file_index_load), (_file_index_id_save_entries),
        (gst_file_index_commit), (gst_file_index_add_association),
index 63fedc0..b9ee9f5 100644 (file)
@@ -919,6 +919,7 @@ gst_element_set_time_delay (GstElement * element, GstClockTime time,
   g_return_if_fail (GST_IS_ELEMENT (element));
   g_return_if_fail (GST_IS_CLOCK (element->clock));
   g_return_if_fail (element->current_state >= GST_STATE_PAUSED);
+  g_return_if_fail (time >= delay);
 
   switch (element->current_state) {
     case GST_STATE_PAUSED:
index ae43a49..668543b 100644 (file)
@@ -818,12 +818,13 @@ GST_LOG (const char *format, ...)
 void gst_debug_print_stack_trace (void);
 
 /* timestamp debugging macros */
+/* FIXME 0.9: move into the correct header (gstclock.h) */
 #define GST_TIME_FORMAT "u:%02u:%02u.%09u"
 #define GST_TIME_ARGS(t) \
-       (guint) (t / (GST_SECOND * 60 * 60)), \
-       (guint) ((t / (GST_SECOND * 60)) % 60), \
-       (guint) ((t / GST_SECOND) % 60), \
-       (guint) (t % GST_SECOND)
+       (guint) ((t) / (GST_SECOND * 60 * 60)), \
+       (guint) (((t) / (GST_SECOND * 60)) % 60), \
+       (guint) (((t) / GST_SECOND) % 60), \
+       (guint) ((t) % GST_SECOND)
 
 G_END_DECLS