omxvideodec: fix pool caps reference stealing
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 26 Jul 2018 14:22:50 +0000 (16:22 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 30 Aug 2018 08:59:30 +0000 (10:59 +0200)
gst_buffer_pool_config_get_params() doesn't ref the returning caps;
so gst_caps_replace() was unreffing the reference owned by the pool.

https://bugzilla.gnome.org/show_bug.cgi?id=796918

omx/gstomxvideodec.c

index 5f86da5..513ce47 100644 (file)
@@ -721,7 +721,7 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
       max = min;
     } else if (max < min) {
       /* Can't use pool because can't have enough buffers */
-      gst_caps_replace (&caps, NULL);
+      caps = NULL;
     } else {
       min = max;
     }