diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-09-30 20:52:30 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2012-09-30 20:16:54 +0100 |
commit | 5e544c1556b5ae6ab61a8f0fe25a6ca3eab81887 (patch) | |
tree | 222f7c1f2c8c4c1a80c1bf8f0f05b1107a52ec7d | |
parent | 3c1a1dfec586fa4c245ea2d2cedf37e433ab0d66 (diff) | |
download | gstreamer-plugins-bad-5e544c1556b5ae6ab61a8f0fe25a6ca3eab81887.tar.gz |
chromaprint: Missing unmap buffer in transform_ip
When no samples have to be processed, transform_ip exits early, but
the buffer it uses was not properly unmapped.
https://bugzilla.gnome.org/show_bug.cgi?id=685159
-rw-r--r-- | ext/chromaprint/gstchromaprint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/chromaprint/gstchromaprint.c b/ext/chromaprint/gstchromaprint.c index a6cb86713..ad9d1fdf2 100644 --- a/ext/chromaprint/gstchromaprint.c +++ b/ext/chromaprint/gstchromaprint.c @@ -209,7 +209,7 @@ gst_chromaprint_transform_ip (GstBaseTransform * trans, GstBuffer * buf) nsamples = map_info.size / (channels * 2); if (nsamples == 0) - return GST_FLOW_OK; + goto end; if (chromaprint->nsamples == 0) { chromaprint_start (chromaprint->context, rate, channels); @@ -225,6 +225,7 @@ gst_chromaprint_transform_ip (GstBaseTransform * trans, GstBuffer * buf) gst_chromaprint_create_fingerprint (chromaprint); } +end: gst_buffer_unmap (buf, &map_info); return GST_FLOW_OK; |