mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
[MOVED FROM GST-P-FARSIGHT] Reset the gst timestamp if the time different is too large
20080704215550-3e2dc-76eb3f600f2b977e916f7e1f654529ddaff06ac9.gz
This commit is contained in:
parent
9e7cada4a9
commit
7d52a6fc1a
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue