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
@ -1327,6 +1327,9 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||||||
samples -= diff;
|
samples -= diff;
|
||||||
data += diff * bps;
|
data += diff * bps;
|
||||||
time = ctime;
|
time = ctime;
|
||||||
|
/* don't align if we clipped */
|
||||||
|
if (bsink->segment.rate >= 0.0)
|
||||||
|
sink->next_sample = -1;
|
||||||
}
|
}
|
||||||
diff = stop - cstop;
|
diff = stop - cstop;
|
||||||
if (diff > 0) {
|
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);
|
G_GUINT64_FORMAT " samples", GST_TIME_ARGS (cstop), diff);
|
||||||
samples -= diff;
|
samples -= diff;
|
||||||
stop = cstop;
|
stop = cstop;
|
||||||
|
/* don't align if we clipped */
|
||||||
|
if (bsink->segment.rate <= 0.0)
|
||||||
|
sink->next_sample = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* figure out how to sync */
|
/* figure out how to sync */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user