Merge pull request #3490 from exeldro/media_speed_duration

deps/media-playback: Fix current time at not standard speed
This commit is contained in:
Jim 2020-09-24 02:16:46 -07:00 committed by GitHub
commit 0b163018b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -907,8 +907,7 @@ void mp_media_stop(mp_media_t *m)
int64_t mp_get_current_time(mp_media_t *m)
{
int speed = (int)((float)m->speed / 100.0f);
return (mp_media_get_base_pts(m) / 1000000) * speed;
return mp_media_get_base_pts(m) * (int64_t)m->speed / 100000000LL;
}
void mp_media_seek_to(mp_media_t *m, int64_t pos)