summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);