summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@darkosphere.fr>2014-06-18 23:04:33 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-06-20 11:54:25 +0200
commit58aa603b36eb74cf54d492381c6a9f98cd9c3678 (patch)
treefd3916d08697785d14b8984cc3c9fc9a07b42552
parentad969ffda34f671252d115fbb3293fae43f1b0e6 (diff)
downloadgst-omx-58aa603b36eb74cf54d492381c6a9f98cd9c3678.tar.gz
omxvideodec: fix a query leak
Also add a debug message if query fails. https://bugzilla.gnome.org/show_bug.cgi?id=731898
-rw-r--r--omx/gstomxvideodec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 2fc7f19..eb52d13 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1504,9 +1504,12 @@ eos:
{
g_mutex_lock (&self->drain_lock);
if (self->draining) {
+ GstQuery *query = gst_query_new_drain ();
+
/* Drain the pipeline to reclaim all memories back to the pool */
- gst_pad_peer_query (GST_VIDEO_DECODER_SRC_PAD (self),
- gst_query_new_drain ());
+ if (!gst_pad_peer_query (GST_VIDEO_DECODER_SRC_PAD (self), query))
+ GST_DEBUG_OBJECT (self, "drain query failed");
+ gst_query_unref (query);
GST_DEBUG_OBJECT (self, "Drained");
self->draining = FALSE;