summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2015-02-12 14:50:45 +0100
committerEdward Hervey <bilboed@bilboed.com>2015-02-12 15:58:25 +0100
commit166ea9bc178a1987ef7f28ac3d080ec7ade93cf8 (patch)
treebc859b4a0799f7a873e376da44811238153f4d87
parent29ddd9cf8f3901f689d6d52f31e025826ea7274c (diff)
androidmedia: Don't leak reference to GLContextamczerocopy-gl-wip
gst_structure_get() returns a new reference
-rw-r--r--sys/androidmedia/gstamcvideodec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index e6f61875a..34b331917 100644
--- a/sys/androidmedia/gstamcvideodec.c
+++ b/sys/androidmedia/gstamcvideodec.c
@@ -1717,6 +1717,11 @@ gst_amc_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query)
gst_object_unref (gl_display);
gst_gl_context_create (self->gl_context, gl_context, NULL);
+
+ /* Remove the reference we got via gst_structure_get() */
+ if (gl_context)
+ gst_object_unref (gl_context);
+
}
gst_buffer_pool_set_config (pool, config);