queue2: fix buffer leak on eos when using the ring buffer
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 7 Apr 2011 19:45:22 +0000 (20:45 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 7 Apr 2011 19:50:04 +0000 (20:50 +0100)
plugins/elements/gstqueue2.c

index db6b7b4..adc304a 100644 (file)
@@ -1212,6 +1212,7 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
           } else {
             GST_DEBUG_OBJECT (queue,
                 "EOS hit and we don't have any requested data");
+            gst_buffer_unref (buf);
             return GST_FLOW_UNEXPECTED;
           }
         }