Commit 3a6db5e9 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

chromecast: don't wait for seek if it failed

This happened when seeking on start.

(cherry picked from commit 4f449f49)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 221eb929
......@@ -494,8 +494,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;
......
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment