buffer: improve _set_size()
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 3 Apr 2012 14:51:54 +0000 (16:51 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 4 Apr 2012 07:33:13 +0000 (09:33 +0200)
gst/gstbuffer.h

index ce8d220..0b3a7f8 100644 (file)
@@ -323,7 +323,7 @@ void        gst_buffer_resize_range        (GstBuffer *buffer, guint idx, gint l
  * Set the size of @b to @s. This will remove or trim the memory blocks
  * in the buffer.
  */
-#define     gst_buffer_set_size(b,s)       gst_buffer_resize ((b), 0, (s))
+#define     gst_buffer_set_size(b,s)       gst_buffer_resize_range ((b), 0, -1, 0, (s))
 
 gboolean    gst_buffer_map_range           (GstBuffer *buffer, guint idx, gint length,
                                             GstMapInfo *info, GstMapFlags flags);