Actually accumulate the sample counter to check the accumulated error
between actual timestamps and expected ones instead of just resetting
the error back to 0 with every new buffer.
Also don't reset discont_time whenever we don't resync. The whole point of
discont_time is to remember when we first detected a discont until we actually
act on it a bit later if the discont stayed around for discont_wait time.
https://bugzilla.gnome.org/show_bug.cgi?id=746032
G_GUINT64_FORMAT ", got %" G_GUINT64_FORMAT,
pad->next_offset, start_offset);
pad->output_offset = -1;
+ pad->next_offset = end_offset;
} else {
- pad->discont_time = GST_CLOCK_TIME_NONE;
+ pad->next_offset += pad->size / bpf;
}
- pad->next_offset = end_offset;
-
if (pad->output_offset == -1) {
GstClockTime start_running_time;
GstClockTime end_running_time;