pngenc: Call png_error() instead of using longjmp() directly.
authorРуслан Ижбулатов <lrn1986@gmail.com>
Fri, 12 Mar 2010 13:44:30 +0000 (16:44 +0300)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 13 Mar 2010 05:13:00 +0000 (06:13 +0100)
Fixes #612700

ext/libpng/gstpngenc.c

index 760147b..9143fbe 100644 (file)
@@ -224,8 +224,7 @@ user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
 
   if (pngenc->written + length >= GST_BUFFER_SIZE (pngenc->buffer_out)) {
     GST_ERROR_OBJECT (pngenc, "output buffer bigger than the input buffer!?");
-    /* yuck */
-    longjmp (pngenc->png_struct_ptr->jmpbuf, 1);
+    png_error (png_ptr, "output buffer bigger than the input buffer!?");
 
     /* never reached */
     return;