deps/media-playback: Fix bug about audio without best_effort_timestamp

This commit is contained in:
wangshaohui 2021-07-19 15:45:42 +08:00 committed by Jim
parent 2f07107e88
commit decd3c2678
2 changed files with 3 additions and 2 deletions

View file

@ -435,4 +435,5 @@ void mp_decode_flush(struct mp_decode *d)
d->eof = false;
d->frame_pts = 0;
d->frame_ready = false;
d->next_pts = 0;
}

View file

@ -501,14 +501,14 @@ static bool mp_media_reset(mp_media_t *m)
bool stopping;
bool active;
seek_to(m, m->fmt->start_time);
int64_t next_ts = mp_media_get_base_pts(m);
int64_t offset = next_ts - m->next_pts_ns;
m->eof = false;
m->base_ts += next_ts;
m->seek_next_ts = false;
seek_to(m, m->fmt->start_time);
pthread_mutex_lock(&m->mutex);
stopping = m->stopping;