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:
wm4 2014-11-20 22:27:27 +01:00
parent f93ce21d45
commit 7df909e9fc
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}