From 0126e756769b9af7d8309eb582c11ea249434f3e Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 3 Jul 2014 15:21:18 -0400 Subject: [PATCH] v4l2object: Pool might be NULL in decide allocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If special stride is needed and downstream don't support VideoMeta, pool might be NULL in order to let the baseclass create a generic pool­. This would lead to assertion with on Exynos with: gst-launch-1.0 -v filesrc location=mov ! qtdemux ! h264parse ! \ v4l2video8dec ! fakesink https://bugzilla.gnome.org/show_bug.cgi?id=732707 --- sys/v4l2/gstv4l2object.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 83598ae..3b22b1a 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -3360,11 +3360,13 @@ setup_other_pool: } } - /* For simplicity, simply read back the active configuration, so our base - * class get the right information */ - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_get_params (config, NULL, &size, &min, &max); - gst_structure_free (config); + if (pool) { + /* For simplicity, simply read back the active configuration, so our base + * class get the right information */ + config = gst_buffer_pool_get_config (pool); + gst_buffer_pool_config_get_params (config, NULL, &size, &min, &max); + gst_structure_free (config); + } done: if (update) -- 2.7.4