fixes for animated GIFs playing (patch 1097003)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-01-31 22:21:11 +00:00
parent be575a0160
commit 6b5403c8d6
2 changed files with 11 additions and 9 deletions

View File

@@ -271,17 +271,19 @@ bool wxGIFDecoder::GoPrevFrame(bool cyclic)
bool wxGIFDecoder::GoFrame(int which)
{
int i;
if (!IsAnimation())
return false;
if ((which >= 1) && (which <= m_nimages))
{
m_image = 1;
m_pimage = m_pfirst;
for (i = 0; i < which; i++)
while (m_image < which)
{
m_image++;
m_pimage = m_pimage->next;
}
return true;
}
@@ -752,7 +754,7 @@ int wxGIFDecoder::ReadGIF()
transparent = buf[4];
/* read disposal method */
disposal = (buf[1] & 0x1C) - 1;
disposal = ((buf[1] & 0x1C) >> 2) - 1;
}
else
/* other extension, skip */