mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
audiosink: don't align when we clip
Don't align samples when they were clipped. Not entirely correct but better than nothing for now.
This commit is contained in:
parent
d3d661ec7f
commit
cb4952fc2e
1 changed files with 6 additions and 0 deletions
|
@ -1327,6 +1327,9 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
samples -= diff;
|
||||
data += diff * bps;
|
||||
time = ctime;
|
||||
/* don't align if we clipped */
|
||||
if (bsink->segment.rate >= 0.0)
|
||||
sink->next_sample = -1;
|
||||
}
|
||||
diff = stop - cstop;
|
||||
if (diff > 0) {
|
||||
|
@ -1336,6 +1339,9 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
G_GUINT64_FORMAT " samples", GST_TIME_ARGS (cstop), diff);
|
||||
samples -= diff;
|
||||
stop = cstop;
|
||||
/* don't align if we clipped */
|
||||
if (bsink->segment.rate <= 0.0)
|
||||
sink->next_sample = -1;
|
||||
}
|
||||
|
||||
/* figure out how to sync */
|
||||
|
|
Loading…
Reference in a new issue