[M120][WebMedia] Fix AV not sync issue 05/320805/5 submit/tizen/20241122.160013
authorpeng1xiao <peng1.xiao@samsung.com>
Fri, 22 Nov 2024 13:14:17 +0000 (21:14 +0800)
committerxiao peng <peng1.xiao@samsung.com>
Fri, 22 Nov 2024 13:20:47 +0000 (13:20 +0000)
add seek after prepared, before player start
make sure AV be sync, or there will be only video without audio,
or only audio without video
if Av data sent to espp is not sync

Change-Id: I7f27596718973b25f929dccc2f36532e66f163f1
Signed-off-by: peng1xiao <peng1.xiao@samsung.com>
tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc

index ef78d101e4315ee4752f8b55adb6a283de76b533..314b313f861dae1c5743c313420ca1767c3658fc 100644 (file)
@@ -562,11 +562,18 @@ void MediaPlayerESPlusPlayer::Seek(base::TimeDelta time,
     // renderer, and we can safely ignore it.
     if (!seek_cb) {
       LOG_ID(INFO, player_id_)
-          << __func__ << " Ignore seek due to StartPlayingFrom(...) time "
-          << time;
+          << __func__ << "  StartPlayingFrom(...) time " << time;
       if (time != base::TimeDelta())
         current_position_ = time;
-      return;
+#if BUILDFLAG(IS_TIZEN_TV)
+      if (blink::IsHbbTV()) {
+        LOG_ID(INFO, player_id_)
+            << __func__
+            << " hbbtv case Ignore seek due to StartPlayingFrom(...) time  "
+            << time;
+        return;
+      }
+#endif
     }
     // Prevent to set the same pending seek position and
     // stop pushing again from 0sec when media starts 0.
@@ -577,8 +584,8 @@ void MediaPlayerESPlusPlayer::Seek(base::TimeDelta time,
       pending_seek_ = true;
       pending_seek_position_ = time;
     }
-
-    std::move(seek_cb).Run();
+    if (seek_cb)
+      std::move(seek_cb).Run();
     return;
   }