diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-20 14:00:17 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-22 15:57:59 -0400 |
commit | 297ab50ca11936b155e6919625811fbd45ef2eae (patch) | |
tree | 81249fc0f1f913d8d17a62e16010eba9967eacf4 | |
parent | 5fe455e28fc1c63eaa66b545958e588b09807e46 (diff) | |
download | gst-plugins-bad-297ab50ca11936b155e6919625811fbd45ef2eae.tar.gz gst-plugins-bad-297ab50ca11936b155e6919625811fbd45ef2eae.tar.bz2 gst-plugins-bad-297ab50ca11936b155e6919625811fbd45ef2eae.zip |
mimdec: Don't overwrite valid timestamps
-rw-r--r-- | ext/mimic/gstmimdec.c | 6 |
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); |