From 7d08894b38b97c614c50e48bd2e5ee475f3c0667 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 30 Jun 2008 22:53:39 +0000 Subject: ext/libpng/gstpngdec.c: Don't return GST_FLOW_ERROR when buffer_alloc fails - return whatever it returned. Original commit message from CVS: * ext/libpng/gstpngdec.c: Don't return GST_FLOW_ERROR when buffer_alloc fails - return whatever it returned. --- ext/libpng/gstpngdec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/libpng') diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c index e01c13c1..8932e88b 100644 --- a/ext/libpng/gstpngdec.c +++ b/ext/libpng/gstpngdec.c @@ -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; } } -- cgit