From 87d7914d0f60c26ac89fde3cf2a21c6c95c64b0f Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 17 Sep 2017 23:34:58 +0200
Subject: [PATCH] lavf/utils: Do not force chapter end time before chapter
start.
Fixes ticket #6671.
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -3167,7 +3167,7 @@ static void compute_chapters_end(AVFormatContext *s)
if (j != i && next_start > ch->start && next_start < end)
end = next_start;
}
- ch->end = (end == INT64_MAX) ? ch->start : end;
+ ch->end = (end == INT64_MAX || end < ch->start) ? ch->start : end;
}
}
--
1.7.10.4