mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
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
This commit is contained in:
parent
aeca7eb480
commit
93f540bb62
1 changed files with 2 additions and 1 deletions
|
@ -3215,10 +3215,11 @@ no_match:
|
||||||
#define PROBE_NO_DATA(pad,mask,label,defaultval) \
|
#define PROBE_NO_DATA(pad,mask,label,defaultval) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (G_UNLIKELY (pad->num_probes)) { \
|
if (G_UNLIKELY (pad->num_probes)) { \
|
||||||
|
GstFlowReturn pval = defaultval; \
|
||||||
/* pass NULL as the data item */ \
|
/* pass NULL as the data item */ \
|
||||||
GstPadProbeInfo info = { mask, 0, NULL, 0, 0 }; \
|
GstPadProbeInfo info = { mask, 0, NULL, 0, 0 }; \
|
||||||
ret = do_probe_callbacks (pad, &info, defaultval); \
|
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; \
|
goto label; \
|
||||||
} \
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
Loading…
Reference in a new issue