vorbis: port to new memory api

This commit is contained in:
Wim Taymans 2012-02-13 15:17:09 +01:00
parent 029d8a30a2
commit bf476953f4

View file

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