pitch: Fix single input buffer followed by EOS
authorMathieu Duponchelle <mathieu@centricular.com>
Sat, 16 Jun 2018 16:19:39 +0000 (18:19 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Sat, 16 Jun 2018 16:38:46 +0000 (18:38 +0200)
The flush function immediately returned when pitch->next_buffer_offset
was 0.

This is clearly wrong, as next_buffer_offset can be 0 when a single
input buffer has been received, and no output buffer has been produced
before receiving EOS.

Simply remove that condition.

https://bugzilla.gnome.org/show_bug.cgi?id=796603

ext/soundtouch/gstpitch.cc

index b41e665305e35cafa7e4662402c8c68d3256ed3f..e70e29803ab037245cb41c14053c9c910e45b23b 100644 (file)
@@ -393,9 +393,6 @@ gst_pitch_flush_buffer (GstPitch * pitch, gboolean send)
 
   GST_DEBUG_OBJECT (pitch, "flushing buffer");
 
-  if (pitch->next_buffer_offset == 0)
-    return GST_FLOW_OK;
-
   pitch->priv->st->flush ();
   if (!send)
     return GST_FLOW_OK;