summaryrefslogtreecommitdiffstats
path: root/ext/mimic
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mimic')
-rw-r--r--ext/mimic/gstmimdec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index 1323b154..5b28f457 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -154,6 +154,7 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
gint width, height;
GstCaps *caps;
GstFlowReturn res = GST_FLOW_OK;
+ GstClockTime in_time = GST_BUFFER_TIMESTAMP (in);
GST_DEBUG ("in gst_mimdec_chain");
@@ -289,7 +290,10 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
goto out;
}
- GST_BUFFER_TIMESTAMP (out_buf) = mimdec->current_ts * GST_MSECOND;
+ if (GST_CLOCK_TIME_IS_VALID (in_time))
+ GST_BUFFER_TIMESTAMP (out_buf) = in_time;
+ else
+ GST_BUFFER_TIMESTAMP (out_buf) = mimdec->current_ts * GST_MSECOND;
mimic_get_property (mimdec->dec, "width", &width);
mimic_get_property (mimdec->dec, "height", &height);