mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
basesink: Unset the last buffer list if we only got a buffer
Also remember any preroll buffer list.
This commit is contained in:
parent
a9109b2fe6
commit
37a6e8d6df
1 changed files with 6 additions and 1 deletions
|
@ -2255,13 +2255,17 @@ gst_base_sink_do_preroll (GstBaseSink * sink, GstMiniObject * obj)
|
||||||
|
|
||||||
if (GST_IS_BUFFER_LIST (obj)) {
|
if (GST_IS_BUFFER_LIST (obj)) {
|
||||||
buf = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0);
|
buf = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0);
|
||||||
|
gst_base_sink_set_last_buffer (sink, buf);
|
||||||
|
gst_base_sink_set_last_buffer_list (sink, GST_BUFFER_LIST_CAST (obj));
|
||||||
g_assert (NULL != buf);
|
g_assert (NULL != buf);
|
||||||
} else if (GST_IS_BUFFER (obj)) {
|
} else if (GST_IS_BUFFER (obj)) {
|
||||||
buf = GST_BUFFER_CAST (obj);
|
buf = GST_BUFFER_CAST (obj);
|
||||||
/* For buffer lists do not set last buffer for now */
|
/* For buffer lists do not set last buffer for now */
|
||||||
gst_base_sink_set_last_buffer (sink, buf);
|
gst_base_sink_set_last_buffer (sink, buf);
|
||||||
} else
|
gst_base_sink_set_last_buffer_list (sink, NULL);
|
||||||
|
} else {
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (buf) {
|
if (buf) {
|
||||||
GST_DEBUG_OBJECT (sink, "preroll buffer %" GST_TIME_FORMAT,
|
GST_DEBUG_OBJECT (sink, "preroll buffer %" GST_TIME_FORMAT,
|
||||||
|
@ -3503,6 +3507,7 @@ again:
|
||||||
if (!is_list) {
|
if (!is_list) {
|
||||||
/* For buffer lists do not set last buffer for now. */
|
/* For buffer lists do not set last buffer for now. */
|
||||||
gst_base_sink_set_last_buffer (basesink, GST_BUFFER_CAST (obj));
|
gst_base_sink_set_last_buffer (basesink, GST_BUFFER_CAST (obj));
|
||||||
|
gst_base_sink_set_last_buffer_list (basesink, NULL);
|
||||||
|
|
||||||
if (bclass->render)
|
if (bclass->render)
|
||||||
ret = bclass->render (basesink, GST_BUFFER_CAST (obj));
|
ret = bclass->render (basesink, GST_BUFFER_CAST (obj));
|
||||||
|
|
Loading…
Reference in a new issue