diff options
author | Edward Hervey <bilboed@bilboed.com> | 2015-02-12 14:50:45 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-03-11 10:39:38 +0100 |
commit | c78e289a5936be25ab51cebdc2244a5294ffd8d1 (patch) | |
tree | 8d7547b27eaf23442e69bae67065683d716df61a | |
parent | 48658919b4642bb2064c8348d66f8651f6dcebd3 (diff) |
androidmedia: Don't leak reference to GLContext
gst_structure_get() returns a new reference
-rw-r--r-- | sys/androidmedia/gstamcvideodec.c | 5 |
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); |