After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784312 - encodebin: simplify the are_raw_caps function
encodebin: simplify the are_raw_caps function
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-29 00:12 UTC by Jimmy Ohn
Modified: 2017-06-29 19:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
encodebin: simplify the are_raw_caps function (1.07 KB, patch)
2017-06-29 00:14 UTC, Jimmy Ohn
committed Details | Review

Description Jimmy Ohn 2017-06-29 00:12:52 UTC
Remove unnecessary if statement in are_raw_caps function.
we can use result returned by gst_caps_can_intersect quite simple.
Comment 1 Jimmy Ohn 2017-06-29 00:14:53 UTC
Created attachment 354661 [details] [review]
encodebin: simplify the are_raw_caps function
Comment 2 Nicolas Dufresne (ndufresne) 2017-06-29 15:27:44 UTC
Review of attachment 354661 [details] [review]:

::: gst/encoding/gstencodebin.c
@@ +595,3 @@
 {
   GstCaps *raw = gst_static_caps_get (&default_raw_caps);
+  gboolean res = gst_caps_can_intersect (caps, raw);

That's make two function calls for assigning to stack variable. I do think that some compilers won't like it.
Comment 3 Sebastian Dröge (slomo) 2017-06-29 15:31:38 UTC
That's not a problem.
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-29 19:52:39 UTC
Ok then.