Commit b75cc5f0 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

audiobuffersplit: Update output buffer size after each buffer to compensate for accumulated errors

https://bugzilla.gnome.org/show_bug.cgi?id=796981
parent b85517dd
......@@ -381,6 +381,13 @@ gst_audio_buffer_split_output (GstAudioBufferSplit * self, gboolean force,
ret = gst_pad_push (self->srcpad, buffer);
if (ret != GST_FLOW_OK)
break;
/* Update the size based on the accumulated error we have now after
* taking out a buffer. Same code as above */
size = samples_per_buffer * bpf;
if (self->error_per_buffer + self->accumulated_error >=
self->output_buffer_duration_d)
size += bpf;
}
return ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment