mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 19:34:14 +00:00
demux_mkv: fix duration probing for files with non-0 start time
When using --demuxer-mkv-probe-video-duration=full and the file did not start at timestamp 0, the reported duration was still wrong.
This commit is contained in:
parent
919707efb7
commit
555ecbb70e
@ -2933,7 +2933,7 @@ static void probe_last_timestamp(struct demuxer *demuxer)
|
||||
last_ts[STREAM_VIDEO] = mkv_d->cluster_tc;
|
||||
|
||||
if (last_ts[STREAM_VIDEO])
|
||||
mkv_d->duration = last_ts[STREAM_VIDEO] / 1e9;
|
||||
mkv_d->duration = last_ts[STREAM_VIDEO] / 1e9 - demuxer->start_time;
|
||||
|
||||
stream_seek(demuxer->stream, old_pos);
|
||||
mkv_d->cluster_start = mkv_d->cluster_end = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user