mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
basesink: handle empty buffer list more gracefully
Don't abort, just ignore it. It's like a buffer without memories.
This commit is contained in:
parent
2b4d066355
commit
01e44969df
1 changed files with 12 additions and 1 deletions
|
@ -3296,7 +3296,12 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, GstPad * pad,
|
||||||
goto was_eos;
|
goto was_eos;
|
||||||
|
|
||||||
if (is_list) {
|
if (is_list) {
|
||||||
sync_buf = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0);
|
GstBufferList *buffer_list = GST_BUFFER_LIST_CAST (obj);
|
||||||
|
|
||||||
|
if (gst_buffer_list_length (buffer_list) == 0)
|
||||||
|
goto empty_list;
|
||||||
|
|
||||||
|
sync_buf = gst_buffer_list_get (buffer_list, 0);
|
||||||
g_assert (NULL != sync_buf);
|
g_assert (NULL != sync_buf);
|
||||||
} else {
|
} else {
|
||||||
sync_buf = GST_BUFFER_CAST (obj);
|
sync_buf = GST_BUFFER_CAST (obj);
|
||||||
|
@ -3478,6 +3483,12 @@ was_eos:
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
empty_list:
|
||||||
|
{
|
||||||
|
GST_DEBUG_OBJECT (basesink, "buffer list with no buffers");
|
||||||
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
|
||||||
|
return GST_FLOW_OK;
|
||||||
|
}
|
||||||
out_of_segment:
|
out_of_segment:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (basesink, "dropping buffer, out of clipping segment");
|
GST_DEBUG_OBJECT (basesink, "dropping buffer, out of clipping segment");
|
||||||
|
|
Loading…
Reference in a new issue