libs/gst/base/gstbasetransform.c: Don't push the buffer if it's empty.
authorEdward Hervey <bilboed@bilboed.com>
Wed, 25 Oct 2006 13:41:44 +0000 (13:41 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 25 Oct 2006 13:41:44 +0000 (13:41 +0000)
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_chain):
Don't push the buffer if it's empty.
Closes #363095

ChangeLog
libs/gst/base/gstbasetransform.c

index 399a58e..dde6ff1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-25  Edward Hervey  <edward@fluendo.com>
+
+       * libs/gst/base/gstbasetransform.c: (gst_base_transform_chain):
+       Don't push the buffer if it's empty.
+       Closes #363095
+
 2006-10-24  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstevent.h:
index 6fff6c9..f681710 100644 (file)
@@ -1544,7 +1544,8 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
 
   /* outbuf can be NULL, this means a dropped buffer */
   if (outbuf != NULL) {
-    if (ret == GST_FLOW_OK)
+    /* if output buffer is empty, we don't push it out */
+    if ((ret == GST_FLOW_OK) && (GST_BUFFER_SIZE (outbuf) > 0))
       ret = gst_pad_push (trans->srcpad, outbuf);
     else
       gst_buffer_unref (outbuf);