mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 12:02:27 +00:00
basesrc: Clear submitted buffer lists consistently with buffers
And handle the case of a NULL buffer being returned cleanly, which is valid as long as a buffer list is returned instead. Previously this would cause an assertion because of calling gst_buffer_unref() with NULL. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6462>
This commit is contained in:
parent
17b0b949a4
commit
3eedd8221c
1 changed files with 4 additions and 2 deletions
|
@ -2599,7 +2599,8 @@ again:
|
||||||
wait_ret = gst_base_src_wait_playing_unlocked (src);
|
wait_ret = gst_base_src_wait_playing_unlocked (src);
|
||||||
if (wait_ret != GST_FLOW_OK) {
|
if (wait_ret != GST_FLOW_OK) {
|
||||||
if (ret == GST_FLOW_OK && own_res_buf)
|
if (ret == GST_FLOW_OK && own_res_buf)
|
||||||
gst_buffer_unref (res_buf);
|
gst_clear_buffer (&res_buf);
|
||||||
|
gst_clear_buffer_list (&src->priv->pending_bufferlist);
|
||||||
ret = wait_ret;
|
ret = wait_ret;
|
||||||
goto stopped;
|
goto stopped;
|
||||||
}
|
}
|
||||||
|
@ -2612,7 +2613,8 @@ again:
|
||||||
if (G_UNLIKELY (g_atomic_int_get (&src->priv->has_pending_eos))) {
|
if (G_UNLIKELY (g_atomic_int_get (&src->priv->has_pending_eos))) {
|
||||||
if (ret == GST_FLOW_OK) {
|
if (ret == GST_FLOW_OK) {
|
||||||
if (own_res_buf)
|
if (own_res_buf)
|
||||||
gst_buffer_unref (res_buf);
|
gst_clear_buffer (&res_buf);
|
||||||
|
gst_clear_buffer_list (&src->priv->pending_bufferlist);
|
||||||
}
|
}
|
||||||
src->priv->forced_eos = TRUE;
|
src->priv->forced_eos = TRUE;
|
||||||
goto eos;
|
goto eos;
|
||||||
|
|
Loading…
Reference in a new issue