mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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
This commit is contained in:
parent
1b06822ce3
commit
d4c551a292
1 changed files with 4 additions and 10 deletions
10
gst/gstpad.c
10
gst/gstpad.c
|
@ -3643,10 +3643,7 @@ 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
|
||||
* did not answer the query and return FALSE */
|
||||
res = FALSE;
|
||||
|
||||
return res;
|
||||
|
@ -3760,10 +3757,7 @@ 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
|
||||
* did not answer the query and return FALSE */
|
||||
res = FALSE;
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue