mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 17:05:52 +00:00
bytewriter: don't add NULL data
This commit is contained in:
parent
fdd6433757
commit
d1a7d54cb5
1 changed files with 4 additions and 2 deletions
|
@ -259,8 +259,10 @@ gst_byte_writer_reset_and_get_buffer (GstByteWriter * writer)
|
|||
data = gst_byte_writer_reset_and_get_data (writer);
|
||||
|
||||
buffer = gst_buffer_new ();
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_memory_new_wrapped (0, data, g_free, size, 0, size));
|
||||
if (data != NULL) {
|
||||
gst_buffer_take_memory (buffer,
|
||||
gst_memory_new_wrapped (0, data, g_free, size, 0, size));
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue