danylovolokh/VideoPlayerManager

MessagesHandlerThread may blocked

Opened this issue · 1 comments

wkq87 commented

In VideoPlayerView start method, object mReadyForPlaybackIndicator may wait all the time,
try { mReadyForPlaybackIndicator.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); }
but sometimes the player may occur error while playing and no error callback,then the method may blocked forever. And this will cause MessagesHandlerThread blocked too.
if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage " + mLastMessage); mLastMessage.runMessage(); if (SHOW_LOGS) Logger.v(TAG, "run, mLastMessage finished");
this make start method in VideoPlayerView becomes synchronized,so MessageHandler cannot work again even you start a new player.
should we move this wait block to another place when we call method mReadyForPlaybackIndicator.notifyAll()?

遇到了这个问题,有好的解决方案吗 @wkq87