From def17d30f477d77ccf7387f11900123f6b0461b8 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 2 Sep 2010 14:15:29 +0300 Subject: [PATCH] fakesrc: fix use of empty subbuffers Remove a short cut that was ignoring src->data allocation mode. All the called code-path below handle size==0. --- plugins/elements/gstfakesrc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 1594f5d..e82bfb6 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -717,13 +717,9 @@ static GstBuffer * gst_fake_src_create_buffer (GstFakeSrc * src) { GstBuffer *buf; - guint size; + guint size = gst_fake_src_get_size (src); gboolean dump = src->dump; - size = gst_fake_src_get_size (src); - if (size == 0) - return gst_buffer_new (); - switch (src->data) { case FAKE_SRC_DATA_ALLOCATE: buf = gst_fake_src_alloc_buffer (src, size); -- 2.7.4