baseparse: fix memory leak
authorMatus Gajdos <matuszpd@gmail.com>
Thu, 19 Dec 2019 10:28:13 +0000 (11:28 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 15 Feb 2020 17:58:23 +0000 (17:58 +0000)
A buffer to be skipped wasn't unref'd in gst_base_parse_chain().

Fixes #406

libs/gst/base/gstbaseparse.c

index d0910a5085806d45aa166a1e4a5ab416e3e2127b..b9f7f618ee95782d7ef7aa7af4a7c3377a5ff86c 100644 (file)
@@ -3130,6 +3130,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
       GST_DEBUG ("All the buffer is skipped");
       parse->priv->offset += bsize;
       parse->priv->sync_offset = parse->priv->offset;
+      gst_buffer_unref (buffer);
       return GST_FLOW_OK;
     }
     buffer = gst_buffer_make_writable (buffer);