mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-26 07:56:38 +00:00
baseaudiosink: commit correct number of samples when not syncing
This commit is contained in:
parent
34d767c6a8
commit
3e312e6e16
1 changed files with 2 additions and 3 deletions
|
@ -1654,7 +1654,7 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
GST_BUFFER_SIZE (buf), render_start);
|
GST_BUFFER_SIZE (buf), render_start);
|
||||||
/* we don't have a start so we don't know stop either */
|
/* we don't have a start so we don't know stop either */
|
||||||
stop = -1;
|
stop = -1;
|
||||||
goto no_sync;
|
goto no_align;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* let's calc stop based on the number of samples in the buffer instead
|
/* let's calc stop based on the number of samples in the buffer instead
|
||||||
|
@ -1730,7 +1730,7 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
render_stop = render_start + samples;
|
render_stop = render_start + samples;
|
||||||
GST_DEBUG_OBJECT (sink,
|
GST_DEBUG_OBJECT (sink,
|
||||||
"no sync needed. Using render_start=%" G_GUINT64_FORMAT, render_start);
|
"no sync needed. Using render_start=%" G_GUINT64_FORMAT, render_start);
|
||||||
goto no_sync;
|
goto no_align;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bring buffer start and stop times to running time */
|
/* bring buffer start and stop times to running time */
|
||||||
|
@ -1856,7 +1856,6 @@ no_align:
|
||||||
/* number of target samples is difference between start and stop */
|
/* number of target samples is difference between start and stop */
|
||||||
out_samples = render_stop - render_start;
|
out_samples = render_stop - render_start;
|
||||||
|
|
||||||
no_sync:
|
|
||||||
/* we render the first or last sample first, depending on the rate */
|
/* we render the first or last sample first, depending on the rate */
|
||||||
if (bsink->segment.rate >= 0.0)
|
if (bsink->segment.rate >= 0.0)
|
||||||
sample_offset = render_start;
|
sample_offset = render_start;
|
||||||
|
|
Loading…
Reference in a new issue