From 7df909e9fcc897083d4af53939ab392ca708f808 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Nov 2014 22:27:27 +0100 Subject: 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". --- demux/demux_mkv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'demux/demux_mkv.c') diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 85287e5a80..6f7b3bd066 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -2910,8 +2910,9 @@ static void probe_last_timestamp(struct demuxer *demuxer) if (res > 0) { if (block.track && block.track->stream) { enum stream_type type = block.track->stream->type; - if (last_ts[type] < block.timecode) - last_ts[type] = block.timecode; + uint64_t endtime = block.timecode + block.duration; + if (last_ts[type] < endtime) + last_ts[type] = endtime; } free_block(&block); } -- cgit v1.2.3