ext/libpng/gstpngdec.c: Don't return GST_FLOW_ERROR when buffer_alloc fails - return...
authorJan Schmidt <thaytan@mad.scientist.com>
Mon, 30 Jun 2008 22:53:39 +0000 (22:53 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Mon, 30 Jun 2008 22:53:39 +0000 (22:53 +0000)
Original commit message from CVS:
* ext/libpng/gstpngdec.c:
Don't return GST_FLOW_ERROR when buffer_alloc fails - return
whatever it returned.

ChangeLog
ext/libpng/gstpngdec.c

index ac48c0d..bbbb96b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-30  Jan Schmidt  <jan.schmidt@sun.com>
+
+       * ext/libpng/gstpngdec.c:
+       Don't return GST_FLOW_ERROR when buffer_alloc fails - return
+       whatever it returned.
+
 2008-06-29  Mark Nauwelaerts  <mark.nauwelaerts@collabora.co.uk>
 
        * gst/avi/avi-ids.h:
index e01c13c..8932e88 100644 (file)
@@ -228,6 +228,8 @@ user_endrow_callback (png_structp png_ptr, png_bytep new_row,
 
   /* FIXME: implement interlaced pictures */
 
+  /* If buffer_out doesn't exist, it means buffer_alloc failed, which 
+   * will already have set the return code */
   if (GST_IS_BUFFER (pngdec->buffer_out)) {
     size_t offset = row_num * GST_ROUND_UP_4 (pngdec->rowbytes);
 
@@ -236,9 +238,6 @@ user_endrow_callback (png_structp png_ptr, png_bytep new_row,
     memcpy (GST_BUFFER_DATA (pngdec->buffer_out) + offset, new_row,
         pngdec->rowbytes);
     pngdec->ret = GST_FLOW_OK;
-  } else {
-    GST_LOG ("we don't have any output buffer to write this row !");
-    pngdec->ret = GST_FLOW_ERROR;
   }
 }