pitch: Flush only if there are unprocessed samples

Otherwise we end up trying to flush before
sample rate of SoundTouch is set

https://bugzilla.gnome.org/show_bug.cgi?id=796613
This commit is contained in:
Suhas Nayak 2018-06-18 07:39:10 +05:30 committed by Mathieu Duponchelle
parent be6afc6a90
commit 68052a7bc3

View file

@ -390,10 +390,12 @@ static GstFlowReturn
gst_pitch_flush_buffer (GstPitch * pitch, gboolean send)
{
GstBuffer *buffer;
if (pitch->priv->st->numUnprocessedSamples() != 0) {
GST_DEBUG_OBJECT (pitch, "flushing buffer");
pitch->priv->st->flush ();
}
GST_DEBUG_OBJECT (pitch, "flushing buffer");
pitch->priv->st->flush ();
if (!send)
return GST_FLOW_OK;