[MM] fix double seek issue. 03/320703/7
authoryangzhiwen <zw714.yang@samsung.com>
Thu, 21 Nov 2024 05:45:53 +0000 (13:45 +0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 22 Nov 2024 02:08:57 +0000 (02:08 +0000)
when the same time seek come, it will effect the last seek.
because when the last seek begin to push the data, if the next same seek
come will execute Flush which will set the shouldfeed to false.
so that the last seek cannot complete.
so now we should skip the same time seek.

Change-Id: I53a999a27798da20c877e889fa5d4617a536860a
Signed-off-by: yangzhiwen <zw714.yang@samsung.com>
tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc

index 57ea02d84f3c26640f6186c95147d9efe2044935..ef78d101e4315ee4752f8b55adb6a283de76b533 100644 (file)
@@ -589,6 +589,11 @@ void MediaPlayerESPlusPlayer::Seek(base::TimeDelta time,
     return;
   }
 
+  SetShouldFeed(DemuxerStream::AUDIO, false);
+  SetShouldFeed(DemuxerStream::VIDEO, false);
+  ClearBufferQueue(DemuxerStream::VIDEO);
+  ClearBufferQueue(DemuxerStream::AUDIO);
+
   seek_cb_ = std::move(seek_cb);
 
   SeekInternal(time);
@@ -634,10 +639,6 @@ void MediaPlayerESPlusPlayer::Flush(base::OnceClosure flush_cb) {
   UpdateBufferedDtsDifference();
 
   expected_seek_ = true;
-  SetShouldFeed(DemuxerStream::AUDIO, false);
-  SetShouldFeed(DemuxerStream::VIDEO, false);
-  ClearBufferQueue(DemuxerStream::VIDEO);
-  ClearBufferQueue(DemuxerStream::AUDIO);
   buffer_observer_->ResetBufferStatus();
 
   std::move(flush_cb).Run();