fix for bug#40785, #40767: added new state so gif load can be aborted without

an error. pnunn   rev:kin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@74126 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pnunn%netscape.com
2000-07-12 23:27:54 +00:00
parent 57a7c5fa33
commit 86f53d33c9

View File

@@ -116,7 +116,8 @@ typedef enum {
gif_consume_netscape_extension,
gif_consume_comment,
gif_delay,
gif_wait_for_buffer_full
gif_wait_for_buffer_full,
gif_stop_animating //added for animation stop
} gstate;
/* "Disposal" method indicates how the image should be handled in the
@@ -1508,7 +1509,7 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
to stop decoding of subsequent frames. Only the
first frame is displayed for eImageAnimation_None.
*/
gs->state = gif_error;
gs->state = gif_stop_animating;
break;
}
@@ -1609,6 +1610,10 @@ il_gif_write(il_container *ic, const PRUint8 *buf, int32 len)
return MK_IMAGE_LOSSAGE;
break;
case gif_stop_animating:
return 0;
break;
default:
ILTRACE(0,("il:gif: unknown state"));
PR_ASSERT(0);