encoding-profile: set_restriction should accept null as valid

It was checking for GST_IS_CAPS only and that would fail if the new
restriction caps was NULL and its documentation says it accepts NULL as
valid input.
This commit is contained in:
Thiago Santos 2018-10-01 17:51:26 -07:00 committed by Thiago Santos
parent 1d271f9a15
commit 6be312a759

View file

@ -774,7 +774,7 @@ void
gst_encoding_profile_set_restriction (GstEncodingProfile * profile,
GstCaps * restriction)
{
g_return_if_fail (GST_IS_CAPS (restriction));
g_return_if_fail (restriction == NULL || GST_IS_CAPS (restriction));
g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
if (profile->restriction)