summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2015-01-21 11:45:41 +0100
committerEdward Hervey <bilboed@bilboed.com>2015-01-21 14:11:41 +0100
commit93f540bb6277284e40ee1057e6d2f869a1112b78 (patch)
tree6dc66b1979609238b6119d8b1503cd9eae396a37
parentaeca7eb4807de2423ffc3bd798c2b056ab97f79f (diff)
gstpad: Fix PROBE_NO_DATA macro
The problem was that the macro was always used with 'ret' as the defaultval argument. This would result in the macro eventually expanding to if (G_UNLIKELY (ret != ret && ret != GST_FLOW_OK)) ... ret != ret will always fail, and therefore we'd never call the following line. Instead of that, store the previous value locally for comparision
-rw-r--r--gst/gstpad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 4c063fe3c..7fd043d46 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -3215,10 +3215,11 @@ no_match:
#define PROBE_NO_DATA(pad,mask,label,defaultval) \
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
+ GstFlowReturn pval = defaultval; \
/* pass NULL as the data item */ \
GstPadProbeInfo info = { mask, 0, NULL, 0, 0 }; \
ret = do_probe_callbacks (pad, &info, defaultval); \
- if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
+ if (G_UNLIKELY (ret != pval && ret != GST_FLOW_OK)) \
goto label; \
} \
} G_STMT_END