mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
demux_mkv: haali hack: add last frame duration to video length too
From what I can see, only the blockduration of the packet needs to be added, never the "default duration".
This commit is contained in:
parent
f93ce21d45
commit
7df909e9fc
@ -2910,8 +2910,9 @@ static void probe_last_timestamp(struct demuxer *demuxer)
|
|||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
if (block.track && block.track->stream) {
|
if (block.track && block.track->stream) {
|
||||||
enum stream_type type = block.track->stream->type;
|
enum stream_type type = block.track->stream->type;
|
||||||
if (last_ts[type] < block.timecode)
|
uint64_t endtime = block.timecode + block.duration;
|
||||||
last_ts[type] = block.timecode;
|
if (last_ts[type] < endtime)
|
||||||
|
last_ts[type] = endtime;
|
||||||
}
|
}
|
||||||
free_block(&block);
|
free_block(&block);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user