summaryrefslogtreecommitdiffstats
path: root/ext/mimic
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2008-07-04 21:55:50 +0000
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-03-03 14:34:06 -0500
commit7d52a6fc1a7c0a32eca80f935736db2d272f70b6 (patch)
tree1f0bd41725a597d93439b7e71ad966e5f73d1f24 /ext/mimic
parent9e7cada4a92961c4b0fb2fdeea21642c942fef51 (diff)
downloadgst-plugins-bad-7d52a6fc1a7c0a32eca80f935736db2d272f70b6.tar.gz
gst-plugins-bad-7d52a6fc1a7c0a32eca80f935736db2d272f70b6.tar.bz2
gst-plugins-bad-7d52a6fc1a7c0a32eca80f935736db2d272f70b6.zip
[MOVED FROM GST-P-FARSIGHT] Reset the gst timestamp if the time different is too large
20080704215550-3e2dc-76eb3f600f2b977e916f7e1f654529ddaff06ac9.gz
Diffstat (limited to 'ext/mimic')
-rw-r--r--ext/mimic/gstmimdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index bf61794d..5cf1a5fd 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -270,15 +270,17 @@ gst_mimdec_chain (GstPad *pad, GstBuffer *in)
goto out;
}
+ GST_BUFFER_TIMESTAMP(out_buf) = mimdec->gst_timestamp;
+
if (mimdec->last_ts != -1) {
int diff = mimdec->current_ts - mimdec->last_ts;
if (diff < 0 || diff > 5000) {
diff = 1000;
+ mimdec->gst_timestamp = GST_CLOCK_TIME_NONE;
}
if (GST_CLOCK_TIME_IS_VALID (mimdec->gst_timestamp))
mimdec->gst_timestamp += diff * GST_MSECOND;
}
- GST_BUFFER_TIMESTAMP(out_buf) = mimdec->gst_timestamp;
mimdec->last_ts = mimdec->current_ts;