mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
pad: Add a guard against getrange functions not filling a caller-provided buffer
It's a programming error to not do so and would cause all kinds of problems in the caller that assumed its own buffer to have been filled.
This commit is contained in:
parent
e272ae281f
commit
606a9acd74
1 changed files with 4 additions and 0 deletions
|
@ -4878,6 +4878,10 @@ probed_data:
|
|||
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
|
||||
/* If the caller provided a buffer it must be filled by the getrange
|
||||
* function instead of it returning a new buffer */
|
||||
g_return_val_if_fail (!*buffer || res_buf == *buffer, GST_FLOW_ERROR);
|
||||
|
||||
*buffer = res_buf;
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue