From 4e4b65199930808d138d33ee1c7a5b7203693b8c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 7 Jun 2004 01:01:04 +0000 Subject: [PATCH] gst/gstelement.c: add failure check 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 | 8 ++++++++ gst/gstelement.c | 1 + gst/gstinfo.h | 9 +++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4376e19..17a734a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2004-06-07 Benjamin Otte + * 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 + * 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), diff --git a/gst/gstelement.c b/gst/gstelement.c index 63fedc0..b9ee9f5 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -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: diff --git a/gst/gstinfo.h b/gst/gstinfo.h index ae43a49..668543b 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -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 -- 2.7.4