diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-11-03 17:46:57 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-11-12 14:05:19 +0000 |
commit | d4c551a29250723c44a5de8283c46db63b1932f5 (patch) | |
tree | a4a7a3d80b336a7ada0458f039de223cc1ea9c0e /gst/gstpad.c | |
parent | 1b06822ce356c443a801608bca871a991cd97833 (diff) |
pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.
We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.
Added back after previous revert, as it's been double checked.
https://bugzilla.gnome.org/show_bug.cgi?id=740003
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r-- | gst/gstpad.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c index e835e2988..4c063fe3c 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -3643,11 +3643,8 @@ probe_stopped: GST_PAD_STREAM_UNLOCK (pad); /* if a probe dropped, we don't sent it further but assume that the probe - * answered the query and return TRUE */ - if (ret == GST_FLOW_CUSTOM_SUCCESS) - res = TRUE; - else - res = FALSE; + * did not answer the query and return FALSE */ + res = FALSE; return res; } @@ -3760,11 +3757,8 @@ probe_stopped: GST_OBJECT_UNLOCK (pad); /* if a probe dropped, we don't sent it further but assume that the probe - * answered the query and return TRUE */ - if (ret == GST_FLOW_CUSTOM_SUCCESS) - res = TRUE; - else - res = FALSE; + * did not answer the query and return FALSE */ + res = FALSE; return res; } |