Hi!

Attached patch fixes ticket #6671.

Please comment, Carl Eugen
From 87d7914d0f60c26ac89fde3cf2a21c6c95c64b0f Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@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(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 23865c8..7abca63 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to