mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 511689 - Ensure we're always on the correct frame when decoding GIF images. r=jrmuizel,alfredkeyser sr=vlad
This commit is contained in:
parent
f605743309
commit
1fd72ad1bb
@ -421,10 +421,14 @@ void nsGIFDecoder2::EndImageFrame()
|
||||
// image frame decoded before we go off and try to display another frame.
|
||||
mImageContainer->SetFrameTimeout(mGIFStruct.images_decoded, mGIFStruct.delay_time);
|
||||
mImageContainer->EndFrameDecode(mGIFStruct.images_decoded);
|
||||
|
||||
mGIFStruct.images_decoded++;
|
||||
}
|
||||
|
||||
// Unconditionally increment images_decoded, because we unconditionally
|
||||
// append frames in BeginImageFrame(). This ensures that images_decoded
|
||||
// always refers to the frame in mImageContainer we're currently decoding,
|
||||
// even if some of them weren't decoded properly and thus are blank.
|
||||
mGIFStruct.images_decoded++;
|
||||
|
||||
if (mObserver)
|
||||
mObserver->OnStopFrame(nsnull, curframe);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user