mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +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.
This commit is contained in:
parent
6c079367f1
commit
c7103ce4b8
1 changed files with 4 additions and 10 deletions
14
gst/gstpad.c
14
gst/gstpad.c
|
@ -3643,11 +3643,8 @@ probe_stopped:
|
||||||
GST_PAD_STREAM_UNLOCK (pad);
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
|
|
||||||
/* if a probe dropped, we don't sent it further but assume that the probe
|
/* if a probe dropped, we don't sent it further but assume that the probe
|
||||||
* answered the query and return TRUE */
|
* did not answer the query and return FALSE */
|
||||||
if (ret == GST_FLOW_CUSTOM_SUCCESS)
|
res = FALSE;
|
||||||
res = TRUE;
|
|
||||||
else
|
|
||||||
res = FALSE;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -3760,11 +3757,8 @@ probe_stopped:
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
/* if a probe dropped, we don't sent it further but assume that the probe
|
/* if a probe dropped, we don't sent it further but assume that the probe
|
||||||
* answered the query and return TRUE */
|
* did not answer the query and return FALSE */
|
||||||
if (ret == GST_FLOW_CUSTOM_SUCCESS)
|
res = FALSE;
|
||||||
res = TRUE;
|
|
||||||
else
|
|
||||||
res = FALSE;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue