Skip to content

Commit

Permalink
stop before prepare() #136
Browse files Browse the repository at this point in the history
with the latest libmdk, fix no responding
  • Loading branch information
wang-bin committed Aug 27, 2024
1 parent fc2b5dd commit 176f75a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ FVP_EXPORT bool MdkPrepare(int64_t handle, int64_t pos, int64_t seekFlags, void*
auto sp = it->second;
auto wp = weak_ptr<Player>(sp);
const auto tid = this_thread::get_id();
sp->set(mdk::State::Stopped);
sp->waitFor(mdk::State::Stopped); // ensure correct state
sp->prepare(pos, [send_port, postCObject, wp, tid](int64_t position, bool* boost){
auto sp = wp.lock();
if (!sp)
Expand Down

0 comments on commit 176f75a

Please sign in to comment.