From 08525d825d8b1ff319eda7c27fccf4398e93d352 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 8 Jun 2017 12:34:24 +0530 Subject: [PATCH] encodebin: Don't set audiorate property before NULL check --- gst/encoding/gstencodebin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 9910e80..153b37d 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -1530,11 +1530,11 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, GST_LOG ("Adding conversion elements for audio stream"); arate = gst_element_factory_make ("audiorate", NULL); - g_object_set (arate, "tolerance", (guint64) ebin->tolerance, NULL); if (!arate) { missing_element_name = "audiorate"; goto missing_element; } + g_object_set (arate, "tolerance", (guint64) ebin->tolerance, NULL); aconv = gst_element_factory_make ("audioconvert", NULL); aconv2 = gst_element_factory_make ("audioconvert", NULL); ares = gst_element_factory_make ("audioresample", NULL); -- 2.7.4