In SKEW mode, use next_sample == -1 to check for the first sample
when starting to read samples so it resyncs the ringbuffer and
timestamps are ok.
Suggestion from Teemu Katajisto <teemu.katajisto@digia.com>
https://bugzilla.gnome.org/show_bug.cgi?id=648359
GstClockTime rb_timestamp = GST_CLOCK_TIME_NONE;
GstClock *clock;
gboolean first;
+ gboolean first_sample = src->next_sample == -1;
ringbuffer = src->ringbuffer;
spec = &ringbuffer->spec;
* the first time we are ran.
*/
if ((segment_skew >= ringbuffer->spec.segtotal) ||
- (last_read_segment == 0)) {
+ (last_read_segment == 0) || first_sample) {
gint new_read_segment;
gint segment_diff;
guint64 new_sample;