mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
filesink: Fix for updating the index of memory to write in the next iteration
current_buf_mem_idx stands for the index of memory of the corresponding buffer which is scheduled to be written in the next iteration. If all memory objects were scheduled to be written in the current iteration, reset the index to zero so that starting from the first memory object of the next buffer.
This commit is contained in:
parent
5c74c8c4f8
commit
13bee5ae0c
1 changed files with 6 additions and 2 deletions
|
@ -535,9 +535,11 @@ gst_writev_buffer_list (GstObject * sink, gint fd, GstPoll * fdset,
|
|||
left += vecs[num_vecs].iov_len;
|
||||
num_vecs++;
|
||||
}
|
||||
current_buf_mem_idx = j;
|
||||
if (j == num_mem)
|
||||
current_buf_mem_idx = 0;
|
||||
}
|
||||
current_buf_idx = i;
|
||||
current_buf_mem_idx = j;
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -622,9 +624,11 @@ gst_writev_buffer_list (GstObject * sink, gint fd, GstPoll * fdset,
|
|||
left += vecs[num_vecs].iov_len;
|
||||
num_vecs++;
|
||||
}
|
||||
current_buf_mem_idx = j;
|
||||
if (current_buf_mem_idx == num_mem)
|
||||
current_buf_mem_idx = 0;
|
||||
}
|
||||
current_buf_idx = i;
|
||||
current_buf_mem_idx = j;
|
||||
}
|
||||
} while (left > 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue