[vlc-commits] chromecast: don't wait for seek if it failed
Thomas Guillem
git at videolan.org
Wed Feb 7 14:43:21 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb 7 13:52:10 2018 +0100| [4f449f4925007f01d749e55bd0c3c82f983734f3] | committer: Thomas Guillem
chromecast: don't wait for seek if it failed
This happened when seeking on start.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f449f4925007f01d749e55bd0c3c82f983734f3
---
modules/stream_out/chromecast/cast.cpp | 4 +++-
modules/stream_out/chromecast/chromecast.h | 2 +-
modules/stream_out/chromecast/chromecast_ctrl.cpp | 6 ++++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 91f81240e6..0f5014757e 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -492,8 +492,10 @@ static ssize_t AccessWrite(sout_access_out_t *p_access, block_t *p_block)
vlc_fifo_Unlock(p_sys->m_fifo);
/* TODO: put better timestamp */
- p_sys->m_intf->requestPlayerSeek(mdate() + INT64_C(1000000));
+ bool success = p_sys->m_intf->requestPlayerSeek(mdate() + INT64_C(1000000));
vlc_fifo_Lock(p_sys->m_fifo);
+ if (!success)
+ p_sys->m_seeking = false;
}
bool do_pace = false;
diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h
index 3a66a0234f..920b679c76 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -168,7 +168,7 @@ struct intf_sys_t
void setHasInput(const std::string mime_type = "");
- void requestPlayerSeek(mtime_t pos);
+ bool requestPlayerSeek(mtime_t pos);
void setOnSeekDoneCb(on_seek_done_itf on_seek_done, void *on_seek_done_data);
void setOnPausedChangedCb(on_paused_changed_itf on_paused_changed,
void *on_paused_changed_data);
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 3762853b0e..e78b05f040 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -912,13 +912,15 @@ States intf_sys_t::state() const
return m_state;
}
-void intf_sys_t::requestPlayerSeek(mtime_t pos)
+bool intf_sys_t::requestPlayerSeek(mtime_t pos)
{
vlc_mutex_locker locker(&m_lock);
if( !isStatePlaying() || m_mediaSessionId == 0 )
- return;
+ return false;
m_ts_seek = pos;
queueMessage( Seek );
+
+ return true;
}
void intf_sys_t::setOnSeekDoneCb(on_seek_done_itf on_seek_done, void *on_seek_done_data)
More information about the vlc-commits
mailing list