From 1b30a0bbf901c04140770d37c58cb63ef676406e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 15 Oct 2013 21:16:05 -0400 Subject: [PATCH] matroska: don't add time for chapters without a source --- mpvcore/timeline/tl_matroska.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mpvcore/timeline/tl_matroska.c b/mpvcore/timeline/tl_matroska.c index e5276b2a75..e8a855a233 100644 --- a/mpvcore/timeline/tl_matroska.c +++ b/mpvcore/timeline/tl_matroska.c @@ -469,6 +469,9 @@ static void build_timeline_loop(struct MPOpts *opts, /* We're missing a part of the chapter, so add it to the accounting. */ account_missing_time(missing_time, chapter_length, "the source for a chapter could not be found"); + /* We don't have the source, but don't leave a gap in the timeline for + * the source. */ + chapter_length = 0; found:; *starttime += chapter_length; /* If we're after the limit on this chapter, stop here. */