Fix for 76230, some GIFs don't display. r=pavlov, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@93692 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
6a3b5d9b6f
commit
f30c3dd6e5
@ -1225,6 +1225,12 @@ int gif_write(gif_struct *gs, const PRUint8 *buf, PRUint32 len)
|
||||
gs->screen_width = width;
|
||||
gs->x_offset = 0;
|
||||
gs->y_offset = 0;
|
||||
|
||||
(*gs->GIFCallback_BeginGIF)(
|
||||
gs->clientptr,
|
||||
gs->screen_width,
|
||||
gs->screen_height,
|
||||
gs->screen_bgcolor);
|
||||
}
|
||||
/* Work around more broken GIF files that have zero image
|
||||
width or height */
|
||||
|
||||
@ -235,6 +235,11 @@ int BeginGIF(
|
||||
PRUint32 aLogicalScreenHeight,
|
||||
PRUint8 aBackgroundRGBIndex)
|
||||
{
|
||||
// If we have passed an illogical screen size, bail and hope that we'll get
|
||||
// set later by the first frame's local image header.
|
||||
if(aLogicalScreenWidth == 0 || aLogicalScreenHeight == 0)
|
||||
return 0;
|
||||
|
||||
// copy GIF info into imagelib structs
|
||||
nsGIFDecoder2 *decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user