diff options
author | wm4 <wm4@nowhere> | 2014-11-20 22:27:27 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-20 22:27:27 +0100 |
commit | 7df909e9fcc897083d4af53939ab392ca708f808 (patch) | |
tree | 6f32e32880ba678c74e163f3b9a56e5230ba9e19 /demux | |
parent | f93ce21d4572221bfc2863c0237ef919f0883f02 (diff) | |
download | mpv-7df909e9fcc897083d4af53939ab392ca708f808.tar.bz2 mpv-7df909e9fcc897083d4af53939ab392ca708f808.tar.xz |
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".
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |