mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
input-selector: Use proper segments when cleaning cached buffers
We need to use the segment associated with the cached buffer, not the current segment of the pad, otherwise we miscalculate the running time of cached buffers from before a segment change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1270>
This commit is contained in:
parent
4c7bc588e3
commit
8eebe19cae
1 changed files with 1 additions and 3 deletions
|
@ -913,7 +913,6 @@ gst_input_selector_cleanup_old_cached_buffers (GstInputSelector * sel,
|
|||
GST_DEBUG_OBJECT (sel, "Cleaning up old cached buffers");
|
||||
for (walk = GST_ELEMENT_CAST (sel)->sinkpads; walk; walk = g_list_next (walk)) {
|
||||
GstSelectorPad *selpad;
|
||||
GstSegment *seg;
|
||||
GstSelectorPadCachedBuffer *cached_buffer;
|
||||
GSList *maybe_remove;
|
||||
guint queue_position;
|
||||
|
@ -922,13 +921,12 @@ gst_input_selector_cleanup_old_cached_buffers (GstInputSelector * sel,
|
|||
if (!selpad->cached_buffers)
|
||||
continue;
|
||||
|
||||
seg = &selpad->segment;
|
||||
|
||||
maybe_remove = NULL;
|
||||
queue_position = 0;
|
||||
while ((cached_buffer = g_queue_peek_nth (selpad->cached_buffers,
|
||||
queue_position))) {
|
||||
GstBuffer *buffer = cached_buffer->buffer;
|
||||
GstSegment *seg = &cached_buffer->segment;
|
||||
GstClockTime running_time;
|
||||
GSList *l;
|
||||
|
||||
|
|
Loading…
Reference in a new issue