Fix issue that timeline goes back to 00:00 during pressing FF button repeatly
authorJiyeon Kim <jiyeon0402.kim@samsung.com>
Fri, 10 May 2013 05:06:11 +0000 (14:06 +0900)
committerJiyeon Kim <jiyeon0402.kim@samsung.com>
Fri, 10 May 2013 05:14:51 +0000 (14:14 +0900)
[Title] Fix issue that timeline goes back to 00:00 during pressing FF button repeatly
[Problem] N_SE-38067
[Cause] playbackPosition() method return 0.0f when error occured
[Solution] Set m_cachedTime value when return value of currentTime method is not 0.0f caused by internal gstreamer error

Change-Id: Ia831ec1645a075c17c1d0450b395e7791edab805

Source/WebCore/html/HTMLMediaElement.cpp

index 78fe1d1..63a8c97 100755 (executable)
@@ -2138,6 +2138,9 @@ bool HTMLMediaElement::seeking() const
 
 void HTMLMediaElement::refreshCachedTime() const
 {
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+    if (m_player->currentTime() > 0.0f || m_cachedTime == MediaPlayer::invalidTime())
+#endif
     m_cachedTime = m_player->currentTime();
     m_cachedTimeWallClockUpdateTime = WTF::currentTime();
 }
@@ -2152,7 +2155,9 @@ void HTMLMediaElement::invalidateCachedTime()
     static const double minimumTimePlayingBeforeCacheSnapshot = 0.5;
 
     m_minimumWallClockTimeToCacheMediaTime = WTF::currentTime() + minimumTimePlayingBeforeCacheSnapshot;
+#if !ENABLE(TIZEN_GSTREAMER_VIDEO)
     m_cachedTime = MediaPlayer::invalidTime();
+#endif
 }
 
 // playback state