mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
audiomixer: Fix discont detection and buffer alignment code
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
This commit is contained in:
parent
dbe8ae4d98
commit
472069a699
1 changed files with 2 additions and 3 deletions
|
@ -1058,12 +1058,11 @@ gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstAudioMixerPad * pad,
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue