From 3974379a7fc10d7aa4f81308c3d834fe359bcb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 30 May 2013 11:45:10 +0200 Subject: [PATCH] adder: Sync pad properties with the GstController --- gst/adder/gstadder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 9b36a905db..44b68f7717 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -1257,6 +1257,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) GstCollectData *collect_data; GstBuffer *inbuf; gboolean is_gap; + GstClockTime timestamp, stream_time; /* take next to see if this is the last collectdata */ next = g_slist_next (collected); @@ -1273,6 +1274,15 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) continue; } + timestamp = GST_BUFFER_TIMESTAMP (inbuf); + stream_time = + gst_segment_to_stream_time (&collect_data->segment, GST_FORMAT_TIME, + timestamp); + + /* sync object properties on stream time */ + if (GST_CLOCK_TIME_IS_VALID (stream_time)) + gst_object_sync_values (GST_OBJECT (collect_data->pad), stream_time); + is_gap = GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP); /* Try to make an output buffer */