encodebin: Simplify the are_raw_caps function

Remove unnecessary if statement in are_raw_caps function.
we can use result returned by gst_caps_can_intersect quite simple.

https://bugzilla.gnome.org/show_bug.cgi?id=784312
This commit is contained in:
Jimmy Ohn 2017-06-29 09:02:20 +09:00 committed by Nicolas Dufresne
parent 6441df09e9
commit ca18b1f8fd

View file

@ -594,13 +594,10 @@ static inline gboolean
are_raw_caps (const GstCaps * caps)
{
GstCaps *raw = gst_static_caps_get (&default_raw_caps);
gboolean res = gst_caps_can_intersect (caps, raw);
if (gst_caps_can_intersect (caps, raw)) {
gst_caps_unref (raw);
return TRUE;
}
gst_caps_unref (raw);
return FALSE;
return res;
}
/* Returns the number of time a given stream profile is currently used