flacdec: fix buffer leak
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 13 May 2009 08:18:07 +0000 (09:18 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 13 May 2009 08:18:07 +0000 (09:18 +0100)
gst_buffer_replace() will take its own ref, so we still have
to unref the buffer if we don't need it any longer.

ext/flac/gstflacdec.c

index 9fe153aa95cfc7eff130eea9baab05a1bf03fb6b..2276ac74c0183cd263de6d4d4e195af2b47c0272 100644 (file)
@@ -1032,6 +1032,7 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame,
         "not pushing %d samples at offset %" G_GINT64_FORMAT
         " (in seek)", samples, GST_BUFFER_OFFSET (outbuf));
     gst_buffer_replace (&flacdec->pending, outbuf);
+    gst_buffer_unref (outbuf);
     flacdec->pending_samples = samples;
     ret = GST_FLOW_OK;
   }