mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
bufferlist: Warn if copying a buffer fails in gst_buffer_list_copy_deep()
This commit is contained in:
parent
7ecef53dbb
commit
d78b9a5ada
1 changed files with 10 additions and 1 deletions
|
@ -389,7 +389,16 @@ gst_buffer_list_copy_deep (const GstBufferList * list)
|
|||
len = list->n_buffers;
|
||||
for (i = 0; i < len; i++) {
|
||||
GstBuffer *old = list->buffers[i];
|
||||
gst_buffer_list_insert (result, i, gst_buffer_copy_deep (old));
|
||||
GstBuffer *new = gst_buffer_copy_deep (old);
|
||||
|
||||
if (G_LIKELY (new)) {
|
||||
gst_buffer_list_insert (result, i, new);
|
||||
} else {
|
||||
g_warning
|
||||
("Failed to deep copy buffer %p while deep "
|
||||
"copying buffer list %p. Buffer list copy "
|
||||
"will be incomplete", old, list);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue