mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
update for new memory api
This commit is contained in:
parent
05a44b7ac6
commit
e4d6638c22
1 changed files with 4 additions and 1 deletions
|
@ -437,10 +437,13 @@ GstBuffer *
|
||||||
new_aligned_buffer (gint size)
|
new_aligned_buffer (gint size)
|
||||||
{
|
{
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
guint8 *data;
|
||||||
|
|
||||||
|
data = av_malloc (size);
|
||||||
|
|
||||||
buf = gst_buffer_new ();
|
buf = gst_buffer_new ();
|
||||||
gst_buffer_take_memory (buf, -1,
|
gst_buffer_take_memory (buf, -1,
|
||||||
gst_memory_new_wrapped (0, av_malloc (size), av_free, size, 0, size));
|
gst_memory_new_wrapped (0, data, size, 0, size, data, av_free));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue