[FFmpeg-cvslog] lavf/utils: Do not force chapter end time before chapter start.

Carl Eugen Hoyos git at videolan.org
Wed Sep 20 01:57:48 EEST 2017


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun Sep 17 23:34:58 2017 +0200| [2f3a3a7e3270d9c4486fc4d1ed708c2f54338f9c] | committer: Carl Eugen Hoyos

lavf/utils: Do not force chapter end time before chapter start.

Fixes ticket #6671.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f3a3a7e3270d9c4486fc4d1ed708c2f54338f9c
---

 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 23865c88c4..7abca632b5 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;
         }
 }
 



More information about the ffmpeg-cvslog mailing list