projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2755929
)
decklink: Free the correct memory in our own buffer pool
author
Sebastian Dröge
<sebastian@centricular.com>
Thu, 21 Sep 2017 11:40:06 +0000
(14:40 +0300)
committer
Sebastian Dröge
<sebastian@centricular.com>
Thu, 21 Sep 2017 11:40:06 +0000
(14:40 +0300)
The buffer itself is 128 bytes into the allocated memory area, to be
able to store the size and other metadata before it. Freeing the buffer
directly will make malloc moderately unhappy.
sys/decklink/gstdecklink.cpp
patch
|
blob
|
history
diff --git
a/sys/decklink/gstdecklink.cpp
b/sys/decklink/gstdecklink.cpp
index 98021420beb420b62cb53765d9c8c98347e6984a..79a209623a3ea25b116b0cf4e2444a6552ffd2fe 100644
(file)
--- a/
sys/decklink/gstdecklink.cpp
+++ b/
sys/decklink/gstdecklink.cpp
@@
-1030,7
+1030,7
@@
public:
if (size == m_lastBufferSize) {
gst_queue_array_push_tail (m_buffers, buffer);
} else {
- g_free (
buffer
);
+ g_free (
((uint8_t *) buffer) - 128
);
}
g_mutex_unlock (&m_mutex);