encodebin: Don't set audiorate property before NULL check

This commit is contained in:
Arun Raghavan 2017-06-08 12:34:24 +05:30
parent 8bbdad7c31
commit 08525d825d

View file

@ -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);