summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-09-02 14:15:29 +0300
committerStefan Kost <ensonic@users.sf.net>2010-09-02 14:19:24 +0300
commitdef17d30f477d77ccf7387f11900123f6b0461b8 (patch)
treeacdd920cada1fb125f67564fe35d6134536646c2
parent4375e998eed1571638e66a9eaff2110c2306a2b9 (diff)
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.
-rw-r--r--plugins/elements/gstfakesrc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c
index 1594f5d4c..e82bfb648 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);