Commit 1c5a6768 authored by Wim Taymans's avatar Wim Taymans Committed by Wim Taymans
Browse files

buffer: remove unneeded casts

parent 67bd9529
......@@ -498,14 +498,14 @@ gst_buffer_create_sub (GstBuffer * buffer, guint offset, guint size)
/* create the new buffer */
subbuffer = gst_buffer_new ();
subbuffer->parent = parent;
GST_BUFFER_FLAG_SET (GST_BUFFER_CAST (subbuffer), GST_BUFFER_FLAG_READONLY);
GST_BUFFER_FLAG_SET (subbuffer, GST_BUFFER_FLAG_READONLY);
GST_CAT_LOG (GST_CAT_BUFFER, "new subbuffer %p (parent %p)", subbuffer,
parent);
/* set the right values in the child */
GST_BUFFER_DATA (GST_BUFFER_CAST (subbuffer)) = buffer->data + offset;
GST_BUFFER_SIZE (GST_BUFFER_CAST (subbuffer)) = size;
GST_BUFFER_DATA (subbuffer) = buffer->data + offset;
GST_BUFFER_SIZE (subbuffer) = size;
if ((offset == 0) && (size == GST_BUFFER_SIZE (buffer))) {
/* copy all the flags except IN_CAPS */
......@@ -544,7 +544,7 @@ gst_buffer_create_sub (GstBuffer * buffer, guint offset, guint size)
GST_BUFFER_OFFSET_END (subbuffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_CAPS (subbuffer) = NULL;
}
return GST_BUFFER_CAST (subbuffer);
return subbuffer;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment