bytewriter: don't add NULL data

This commit is contained in:
Wim Taymans 2011-03-31 18:39:57 +02:00
parent fdd6433757
commit d1a7d54cb5

View file

@ -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;
}