mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +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/6460>
This commit is contained in:
parent
6a67ae1bfa
commit
6d3ed65179
1 changed files with 4 additions and 2 deletions
|
@ -2637,7 +2637,8 @@ retry_create:
|
|||
|
||||
/* no need keep old buffer while in pause */
|
||||
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);
|
||||
|
||||
wait_ret = gst_base_src_wait_playing_unlocked (src);
|
||||
if (wait_ret != GST_FLOW_OK) {
|
||||
|
@ -2655,7 +2656,8 @@ retry_create:
|
|||
if (G_UNLIKELY (g_atomic_int_get (&src->priv->has_pending_eos))) {
|
||||
if (ret == GST_FLOW_OK) {
|
||||
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;
|
||||
goto eos;
|
||||
|
|
Loading…
Reference in a new issue