And the offset the offset into that buffer. Changing the size will
cause all kinds of assumptions to fail and cause crashes.
if (start_running_time_offset < audiomixer->offset) {
GstBuffer *buf;
guint diff = (audiomixer->offset - start_running_time_offset) * bpf;
+
pad->position += diff;
- pad->size -= diff;
- /* FIXME: This could only happen due to rounding errors */
- if (pad->size == 0) {
+ if (pad->position >= pad->size) {
/* Empty buffer, drop */
gst_buffer_unref (inbuf);
pad->buffer = NULL;