diff --git a/mozilla/modules/libimg/gifcom/gif.cpp b/mozilla/modules/libimg/gifcom/gif.cpp index 090fb00ba6c..fcd8ca47b7c 100644 --- a/mozilla/modules/libimg/gifcom/gif.cpp +++ b/mozilla/modules/libimg/gifcom/gif.cpp @@ -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);