deps/media-playback: Fix invalid seek at reset
When AVFormatContext->startime is set to AV_NO_PTS mp_media_reset try to seek to INT64_MIN use 0 instead. Fix loop with aac file
This commit is contained in:
parent
c19946d7e8
commit
f0b3593349
5
deps/media-playback/media-playback/media.c
vendored
5
deps/media-playback/media-playback/media.c
vendored
@ -558,12 +558,15 @@ static bool mp_media_reset(mp_media_t *m)
|
||||
|
||||
int64_t next_ts = mp_media_get_base_pts(m);
|
||||
int64_t offset = next_ts - m->next_pts_ns;
|
||||
int64_t start_time = m->fmt->start_time;
|
||||
if (start_time == AV_NOPTS_VALUE)
|
||||
start_time = 0;
|
||||
|
||||
m->eof = false;
|
||||
m->base_ts += next_ts;
|
||||
m->seek_next_ts = false;
|
||||
|
||||
seek_to(m, m->fmt->start_time);
|
||||
seek_to(m, start_time);
|
||||
|
||||
pthread_mutex_lock(&m->mutex);
|
||||
stopping = m->stopping;
|
||||
|
Loading…
x
Reference in New Issue
Block a user