GNOME Bugzilla – Bug 731704
gst_caps_is_any() returns FALSE or flag value, not TRUE or FALSE
Last modified: 2014-06-22 11:58:57 UTC
Hi, I use appsrc, and need set caps for appsrc, but such below: GstCaps * gany; gany = gst_caps_new_any(); if (TRUE == gst_caps_is_any(gany)) { g_print("any"); g_object_set(source, "caps", gany, NULL); } else { g_print("not any!"); } //I use old version 0.10.36, gst_caps_is_any is true, but use 1.x, gst_caps_is_any is false!
Nice catch, thanks for the bug report! Most people seem to just do if (gst_caps_is_any (caps)) { ... } which luckily works :) commit 39b69d27da2649740709433b24b8f41b52b20e53 Author: Tim-Philipp Müller <tim@centricular.com> Date: Sun Jun 22 12:52:01 2014 +0100 tests: add unit test for gst_caps_is_any() and _is_empty() https://bugzilla.gnome.org//show_bug.cgi?id=731704 commit 8e30a9462cf1a470f620490f90a9f51cf976655c Author: Tim-Philipp Müller <tim@centricular.com> Date: Sun Jun 22 12:50:42 2014 +0100 caps: gst_caps_is_any() should return TRUE or FALSE Not some flag value instead of TRUE. Fixes code like gst_caps_is_any() == TRUE. https://bugzilla.gnome.org//show_bug.cgi?id=731704