From ca18b1f8fdcfc54229130981d71bde59d749193b Mon Sep 17 00:00:00 2001 From: Jimmy Ohn Date: Thu, 29 Jun 2017 09:02:20 +0900 Subject: [PATCH] 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 --- gst/encoding/gstencodebin.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 65bf509c1d..a340aacab8 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -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