[Bug 752052] appsrc: Initializing min and max in gst_app_src_get_property
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jul 7 05:47:22 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=752052
--- Comment #2 from Tobias Mueller <gnome-bugs at muelli.cryptobitch.de> ---
(In reply to Sebastian Dröge (slomo) from comment #1)
> Add some g_return_if_fail() at the top of get_property().
I'm afraid that this doesn't make the compiler happy.
The only thing that I could get to work is this:
GstAppSrc *appsrc = GST_APP_SRC_CAST (object);
GstAppSrcPrivate *priv = appsrc->priv;
//g_return_if_fail (GST_IS_APP_SRC (object));
//g_return_if_fail (GST_IS_APP_SRC (appsrc));
if (!GST_IS_APP_SRC (object)) return;
else
if (!GST_IS_APP_SRC (appsrc)) return;
else
switch (prop_id) {
case PROP_CAPS:
...
note the two if statements. I don't understand why GCC requires both.
Also note that g_return_if_fail does not seem to get us anything. I guess this
is because it is a macro which can compile to (void)0;. But I'm only guessing.
An easy way out is to assume that GCC is just wrong and to ignore this bug
report. But I'd be careful assuming that...
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list