From 1c5a6768cc254e6a1f922eb407890236c7b02c20 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 27 Dec 2009 19:33:25 +0100 Subject: [PATCH] buffer: remove unneeded casts --- gst/gstbuffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index beec71b..8f4d127 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -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; } /** -- 2.7.4