From 393a5a8fa389bf6ac43ef5be1d911c49a9d9d3f6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 16 Jan 2004 23:02:54 +0000 Subject: [PATCH] gst/gstpad.c: Return a newly allocated buffer when the pad has no peer. Original commit message from CVS: 2004-01-16 Benjamin Otte * gst/gstpad.c: (gst_pad_alloc_buffer): Return a newly allocated buffer when the pad has no peer. --- ChangeLog | 5 +++++ gst/gstpad.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 183e7fe44a..6728300ded 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-16 Benjamin Otte + + * gst/gstpad.c: (gst_pad_alloc_buffer): + Return a newly allocated buffer when the pad has no peer. + 2004-01-16 Benjamin Otte * gst/gstclock.c: (gst_clock_get_time): diff --git a/gst/gstpad.c b/gst/gstpad.c index af0716c64c..2f628138e4 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2605,7 +2605,7 @@ gst_pad_alloc_buffer (GstPad *pad, guint64 offset, gint size) peer = GST_RPAD_PEER (pad); if (!peer) - return NULL; + return gst_buffer_new_and_alloc(size); GST_CAT_DEBUG (GST_CAT_BUFFER, "(%s:%s): getting buffer", GST_DEBUG_PAD_NAME (pad));