diff options
author | Olivier Crete <olivier.crete@collabora.co.uk> | 2008-07-25 22:24:48 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-03-03 14:34:07 -0500 |
commit | 9439baafec6a9af37da98191fc4adb3361ae3a3b (patch) | |
tree | bf411a66f3ad77fc3dca19e69dba4695dc232643 | |
parent | 3e785ea2dedd89ba8fc4dae028002d0addbc2ca1 (diff) | |
download | gst-plugins-bad-9439baafec6a9af37da98191fc4adb3361ae3a3b.tar.gz gst-plugins-bad-9439baafec6a9af37da98191fc4adb3361ae3a3b.tar.bz2 gst-plugins-bad-9439baafec6a9af37da98191fc4adb3361ae3a3b.zip |
[MOVED FROM GST-P-FARSIGHT] Send out the right segment and use stored timestamps directly
20080725222448-3e2dc-e119bf09ede1cf187581d59176c8b35bafb731ae.gz
-rw-r--r-- | ext/mimic/gstmimdec.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index cd679a5a..636b944b 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -254,7 +254,7 @@ gst_mimdec_chain (GstPad *pad, GstBuffer *in) } event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, - mimdec->gst_timestamp, -1, mimdec->gst_timestamp); + mimdec->current_ts * GST_MSECOND, -1, 0); GST_OBJECT_UNLOCK (mimdec); result = gst_pad_push_event (mimdec->srcpad, event); GST_OBJECT_LOCK (mimdec); @@ -279,19 +279,7 @@ 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; - } - mimdec->last_ts = mimdec->current_ts; - + GST_BUFFER_TIMESTAMP(out_buf) = mimdec->current_ts * GST_MSECOND; mimic_get_property(mimdec->dec, "width", &width); mimic_get_property(mimdec->dec, "height", &height); |