summaryrefslogtreecommitdiffstats
path: root/ext/libpng
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2008-06-30 22:53:39 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2008-06-30 22:53:39 +0000
commit7d08894b38b97c614c50e48bd2e5ee475f3c0667 (patch)
tree71e2fe1546fae950e9618cdeeb7497128ef57178 /ext/libpng
parentae82126a56898c37b4e242cc370dfa28c151c471 (diff)
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.
Diffstat (limited to 'ext/libpng')
-rw-r--r--ext/libpng/gstpngdec.c5
1 files changed, 2 insertions, 3 deletions
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;
}
}