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
@ -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>
|
2008-06-29 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||||
|
|
||||||
* gst/avi/avi-ids.h:
|
* gst/avi/avi-ids.h:
|
||||||
|
@ -228,6 +228,8 @@ user_endrow_callback (png_structp png_ptr, png_bytep new_row,
|
|||||||
|
|
||||||
/* FIXME: implement interlaced pictures */
|
/* 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)) {
|
if (GST_IS_BUFFER (pngdec->buffer_out)) {
|
||||||
size_t offset = row_num * GST_ROUND_UP_4 (pngdec->rowbytes);
|
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,
|
memcpy (GST_BUFFER_DATA (pngdec->buffer_out) + offset, new_row,
|
||||||
pngdec->rowbytes);
|
pngdec->rowbytes);
|
||||||
pngdec->ret = GST_FLOW_OK;
|
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…
x
Reference in New Issue
Block a user