Skip to content

utils: Avoid memory merge in gst_util_dump_buffer()

For buffers with multiple memory chunks, gst_buffer_map() has the side effect of merging the memory chunks into one contiguous chunk. Since gst_util_dump_mem() used gst_buffer_map() the internals of the buffer could actually change as a result of printing it.

For the case of a buffer containing several memory chunks, gst_memory_map() is now used to obtain the memory address and each memory chunk is dumped separately preceded by a header line. The behaviour for a buffer containing a single memory chunk is left unchanged.

Merge request reports