mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
vorbis: port to new memory api
This commit is contained in:
parent
029d8a30a2
commit
bf476953f4
1 changed files with 7 additions and 5 deletions
|
@ -138,15 +138,17 @@ gst_ogg_packet_size (ogg_packet * p)
|
|||
|
||||
static inline void
|
||||
gst_ogg_packet_wrapper_map (ogg_packet_wrapper * packet,
|
||||
GstBuffer * buffer)
|
||||
GstBuffer * buffer, GstMapInfo * map)
|
||||
{
|
||||
GstMapInfo info;
|
||||
ogg_reference *ref = &packet->ref;
|
||||
ogg_buffer *buf = &packet->buf;
|
||||
gsize size;
|
||||
|
||||
gst_buffer_ref (buffer);
|
||||
buf->data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
|
||||
buf->size = size;
|
||||
gst_buffer_map (buffer, map, GST_MAP_READ);
|
||||
buf->data = map->data;
|
||||
buf->size = map->size;
|
||||
buf->refcount = 1;
|
||||
buf->ptr.owner = NULL;
|
||||
buf->ptr.next = NULL;
|
||||
|
@ -162,12 +164,12 @@ gst_ogg_packet_wrapper_map (ogg_packet_wrapper * packet,
|
|||
|
||||
static inline void
|
||||
gst_ogg_packet_wrapper_unmap (ogg_packet_wrapper * packet,
|
||||
GstBuffer * buffer)
|
||||
GstBuffer * buffer, GstMapInfo * map)
|
||||
{
|
||||
ogg_reference *ref = &packet->ref;
|
||||
ogg_buffer *buf = &packet->buf;
|
||||
|
||||
gst_buffer_unmap (buffer, buf->data, buf->size);
|
||||
gst_buffer_unmap (buffer, map);
|
||||
gst_buffer_unref (buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue