mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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:
parent
3f5920ae5d
commit
d5adfff978
6
deps/media-playback/media-playback/media.c
vendored
6
deps/media-playback/media-playback/media.c
vendored
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue