gst/autoplug/gstspideridentity.c: break infinite loop by just returning instead of looping

Original commit message from CVS:
2004-01-15  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_sink_loop_type_finding):
break infinite loop by just returning instead of looping
* gst/gstclock.c: (gst_clock_class_init), (gst_clock_set_property):
set event time difference correctly. Set it to 1 second instead
of 100ms to be more tolerant
* gst/gstelement.c: (gst_element_set_time):
add debugging output
This commit is contained in:
Benjamin Otte 2004-01-15 01:35:41 +00:00
parent 6a06c610da
commit 5e8a2fb8a4
4 changed files with 22 additions and 7 deletions

View file

@ -1,3 +1,14 @@
2004-01-15 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_sink_loop_type_finding):
break infinite loop by just returning instead of looping
* gst/gstclock.c: (gst_clock_class_init), (gst_clock_set_property):
set event time difference correctly. Set it to 1 second instead
of 100ms to be more tolerant
* gst/gstelement.c: (gst_element_set_time):
add debugging output
2004-01-14 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstqueue.c: (gst_queue_getcaps), (gst_queue_link):

View file

@ -467,9 +467,9 @@ gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident)
g_return_if_fail (GST_IS_SPIDER_IDENTITY (ident));
data = gst_pad_pull (ident->sink);
while (!GST_IS_BUFFER (data)) {
if (!GST_IS_BUFFER (data)) {
gst_spider_identity_chain (ident->sink, GST_BUFFER (data));
data = gst_pad_pull (ident->sink);
return;
}
find.buffer = GST_BUFFER (data);

View file

@ -34,7 +34,7 @@
static GstAllocTrace *_gst_clock_entry_trace;
#endif
#define DEFAULT_EVENT_DIFF (GST_SECOND / 10)
#define DEFAULT_EVENT_DIFF (GST_SECOND)
#define DEFAULT_MAX_DIFF (2 * GST_SECOND)
enum {
@ -386,10 +386,10 @@ gst_clock_class_init (GstClockClass *klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MAX_DIFF,
g_param_spec_int64 ("max-diff", "Max diff", "The maximum amount of time to wait in nanoseconds",
0, G_MAXINT64, DEFAULT_MAX_DIFF, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MAX_DIFF,
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_EVENT_DIFF,
g_param_spec_uint64 ("event-diff", "event diff",
"The amount of time that may elapse until 2 events are treated as happening at different times",
0, G_MAXUINT64, DEFAULT_EVENT_DIFF, G_PARAM_READWRITE));
0, G_MAXUINT64, DEFAULT_EVENT_DIFF, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
}
static void
@ -702,7 +702,7 @@ gst_clock_set_property (GObject *object, guint prop_id,
break;
case ARG_EVENT_DIFF:
clock->max_event_diff = g_value_get_uint64 (value);
g_object_notify (object, "max-event-diff");
g_object_notify (object, "event-diff");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);

View file

@ -878,6 +878,8 @@ gst_element_wait (GstElement *element, GstClockTime timestamp)
void
gst_element_set_time (GstElement *element, GstClockTime time)
{
GstClockTime event_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);
@ -887,7 +889,9 @@ gst_element_set_time (GstElement *element, GstClockTime time)
element->base_time = time;
break;
case GST_STATE_PLAYING:
element->base_time = gst_clock_get_time (element->clock) - time;
event_time = gst_clock_get_event_time (element->clock);
GST_LOG_OBJECT (element, "clock time %llu: setting element time to %llu", event_time, time);
element->base_time = event_time - time;
break;
default:
g_assert_not_reached ();