From: Eunki, Hong Date: Wed, 15 Jun 2022 04:56:47 +0000 (+0900) Subject: Fix webp loading decode frame bug X-Git-Tag: dali_2.1.27~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F276344%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Fix webp loading decode frame bug When we try to decode at the same frame, same loader and not 0 frame, It will fail to decode. Due to we don't hold latest preload pixel buffer, It will think that we fail to decode the frame. This patch make we decode current frame one more time. Change-Id: I6ab6cd0a5929c4d7b184d0508313c6906750ab9a Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/imaging/common/webp-loading.cpp b/dali/internal/imaging/common/webp-loading.cpp index 61baf2a..7790c66 100644 --- a/dali/internal/imaging/common/webp-loading.cpp +++ b/dali/internal/imaging/common/webp-loading.cpp @@ -119,7 +119,7 @@ public: mWebPData.bytes = mBuffer; WebPDemuxer* demuxer = WebPDemux(&mWebPData); - uint32_t flags = WebPDemuxGetI(demuxer, WEBP_FF_FORMAT_FLAGS); + uint32_t flags = WebPDemuxGetI(demuxer, WEBP_FF_FORMAT_FLAGS); if(flags & ANIMATION_FLAG) { mIsAnimatedImage = true; @@ -268,7 +268,7 @@ public: bool mIsLocalResource; #ifdef DALI_WEBP_AVAILABLE - WebPData mWebPData{0}; + WebPData mWebPData{0}; #endif #ifdef DALI_ANIMATED_WEBP_ENABLED @@ -397,7 +397,7 @@ Dali::Devel::PixelBuffer WebPLoading::DecodeFrame(uint32_t frameIndex) { Dali::Devel::PixelBuffer pixelBuffer; #ifdef DALI_ANIMATED_WEBP_ENABLED - if(mImpl->mLatestLoadedFrame > static_cast(frameIndex)) + if(mImpl->mLatestLoadedFrame >= static_cast(frameIndex)) { mImpl->mLatestLoadedFrame = INITIAL_INDEX; WebPAnimDecoderReset(mImpl->mWebPAnimDecoder);