mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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.
This commit is contained in:
parent
ae82126a56
commit
7d08894b38
2 changed files with 8 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue