diff options
author | ace20022 <ace20022@ymail.com> | 2016-01-03 23:51:18 +0100 |
---|---|---|
committer | ace20022 <ace20022@ymail.com> | 2016-01-06 23:39:21 +0100 |
commit | 1f925f40d3436b2a7dea4d0e3089534a4e3f8f99 (patch) | |
tree | 7a17e4660171150fdc059db98c29371bd59114cf | |
parent | 66d7d3db65f432420dbf63c67e1317a41fd7cada (diff) |
[gif] Fix for version < 5: delay and transparent are stored as uint8_t.
-rw-r--r-- | xbmc/guilib/Gif.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/guilib/Gif.cpp b/xbmc/guilib/Gif.cpp index 0748b2430a..8b3f3f7050 100644 --- a/xbmc/guilib/Gif.cpp +++ b/xbmc/guilib/Gif.cpp @@ -333,13 +333,13 @@ bool Gif::GcbToFrame(GifFrame &frame, unsigned int imgIdx) } else { - frame.m_delay = UNSIGNED_LITTLE_ENDIAN(extb->Bytes[1], extb->Bytes[2]) * 10; + uint8_t low = static_cast<uint8_t>(extb->Bytes[1]); + uint8_t high = static_cast<uint8_t>(extb->Bytes[2]); + frame.m_delay = UNSIGNED_LITTLE_ENDIAN(low, high) * 10; frame.m_disposal = (extb->Bytes[0] >> 2) & 0x07; if (extb->Bytes[0] & 0x01) { - transparent = static_cast<int>(extb->Bytes[3]); - if (transparent < 0) - transparent += 256; + transparent = static_cast<uint8_t>(extb->Bytes[3]); } else transparent = -1; |