transcodebin: fix caps NULL unref

gst_pad_get_current_caps() can return a NULL pointer which was raisin a CRITICAL.
This commit is contained in:
Guillaume Desmottes 2020-04-16 16:17:56 +00:00 committed by Thibault Saunier
parent 040077dbc8
commit b5a28df0f3

View file

@ -271,7 +271,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstTranscodeBin * self)
"sink-pad", GST_TYPE_PAD, sinkpad,
"sink-caps", GST_TYPE_CAPS, othercaps, NULL));
gst_caps_unref (caps);
gst_clear_caps (&caps);
if (othercaps)
gst_caps_unref (othercaps);
}