提交 d5adfff9 编写于 作者: J jp9000

deps/media-playback: Fix playback reset fail after stop

The recent changes in 88ae9aff causes av_read_frame to check for
m->stopping, and fail with AVERROR_EXIT if true, which would happen
after each reset.  Moving mp_media_prepare_frames to a line after
m->stopping is reset to false fixes the issue.
上级 3f5920ae
......@@ -427,15 +427,15 @@ static bool mp_media_reset(mp_media_t *m)
m->eof = false;
m->base_ts += next_ts;
if (!mp_media_prepare_frames(m))
return false;
pthread_mutex_lock(&m->mutex);
stopping = m->stopping;
active = m->active;
m->stopping = false;
pthread_mutex_unlock(&m->mutex);
if (!mp_media_prepare_frames(m))
return false;
if (active) {
if (!m->play_sys_ts)
m->play_sys_ts = (int64_t)os_gettime_ns();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册