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

The recent changes in 88ae9af 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.
This commit is contained in:
jp9000 2017-06-14 08:20:30 -07:00
parent 3f5920ae5d
commit d5adfff978

View file

@ -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();