Skip to content
Snippets Groups Projects
Commit faf4bde9 authored by Erik Walthinsen's avatar Erik Walthinsen
Browse files

fixes for gstbuffer, and removed ## from gstcaps.h that was causing all that warning noise

Original commit message from CVS:
fixes for gstbuffer, and removed ## from gstcaps.h that was causing all that warning noise
parent e5abd7fd
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,6 @@ gst_buffer_new(void)
buffer->refcount = 1;
#endif
buffer->flags = 0;
buffer->type = 0;
buffer->data = NULL;
buffer->size = 0;
buffer->maxsize = 0;
......@@ -126,7 +125,6 @@ gst_buffer_create_sub (GstBuffer *parent,
// copy flags and type from parent, for lack of better
buffer->flags = parent->flags;
buffer->type = parent->type;
// set the data pointer, size, offset, and maxsize
buffer->data = parent->data + offset;
......@@ -414,7 +412,7 @@ gst_buffer_copy (GstBuffer *buffer)
newbuf = gst_buffer_new();
GST_BUFFER_SIZE(newbuf) = GST_BUFFER_SIZE(buffer);
GST_BUFFER_DATA(newbuf) = malloc(GST_BUFFER_SIZE(buffer));
memcpy(GST_BUFFER_DATA(newbuf),GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buffer));
memcpy(GST_BUFFER_DATA(newbuf),GST_BUFFER_DATA(buffer),GST_BUFFER_SIZE(buffer));
GST_BUFFER_MAXSIZE(newbuf) = GST_BUFFER_MAXSIZE(buffer);
GST_BUFFER_OFFSET(newbuf) = GST_BUFFER_OFFSET(buffer);
GST_BUFFER_TIMESTAMP(newbuf) = GST_BUFFER_TIMESTAMP(buffer);
......
......@@ -54,13 +54,14 @@ extern "C" {
G_STMT_START{ (GST_BUFFER_FLAGS(buf) &= ~(1<<(flag))); }G_STMT_END
#define GST_BUFFER_TYPE(buf) (GST_BUFFER(buf)->type)
#define GST_BUFFER_DATA(buf) (GST_BUFFER(buf)->data)
#define GST_BUFFER_SIZE(buf) (GST_BUFFER(buf)->size)
#define GST_BUFFER_OFFSET(buf) (GST_BUFFER(buf)->offset)
#define GST_BUFFER_MAXSIZE(buf) (GST_BUFFER(buf)->maxsize)
#define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER(buf)->timestamp)
#define GST_BUFFER_MAXAGE(buf) (GST_BUFFER(buf)->maxage)
#define GST_BUFFER_BUFFERPOOL(buf) (GST_BUFFER(buf)->pool)
#define GST_BUFFER_PARENT(buf) (GST_BUFFER(buf)->parent)
#define GST_BUFFER_POOL_PRIVATE(buf) (GST_BUFFER(buf)->pool_private)
......@@ -96,8 +97,6 @@ struct _GstBuffer {
#define GST_BUFFER_REFCOUNT(buf) (GST_BUFFER(buf)->refcount)
#endif
/* data type of this buffer */
guint16 type;
/* flags */
guint16 flags;
......
......@@ -61,7 +61,7 @@ gst_caps_new ( \
name, \
type, \
gst_props_new ( \
##a, \
a, \
NULL))
#define GST_CAPS_FACTORY(factoryname, a...) \
......@@ -70,7 +70,7 @@ factoryname (void) \
{ \
static GstCaps *caps = NULL; \
if (!caps) { \
caps = gst_caps_chain (##a, NULL); \
caps = gst_caps_chain (a, NULL); \
} \
return caps; \
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment