flacenc: do not drop the first data buffer on the floor (and leak it either)
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 12 Jan 2012 10:30:11 +0000 (10:30 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 12 Jan 2012 10:30:56 +0000 (10:30 +0000)
ext/flac/gstflacenc.c

index d30d314..6206529 100644 (file)
@@ -1072,7 +1072,9 @@ gst_flac_enc_write_callback (const FLAC__StreamEncoder * encoder,
       ret = gst_flac_enc_process_stream_headers (flacenc);
       flacenc->got_headers = TRUE;
     }
-  } else if (flacenc->got_headers && samples == 0) {
+  }
+
+  if (flacenc->got_headers && samples == 0) {
     /* header fixup, push downstream directly */
     GST_DEBUG_OBJECT (flacenc, "Fixing up headers at pos=%" G_GUINT64_FORMAT
         ", size=%u", flacenc->offset, (guint) bytes);