John Stebbins <[email protected]> added the comment:

Attaching patch that fixes this issue.  There are missing parenthesis in 
the computation of max_time.

----------
topic:  -avformat, regression

______________________________________________
Libav issue tracker <[email protected]>
<https://roundup.libav.org/issue2688>
______________________________________________
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ad22601..8cdd8b3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2110,7 +2110,7 @@ enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
 static void compute_chapters_end(AVFormatContext *s)
 {
     unsigned int i, j;
-    int64_t max_time = s->duration + (s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time;
+    int64_t max_time = s->duration + ((s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time);
 
     for (i = 0; i < s->nb_chapters; i++)
         if (s->chapters[i]->end == AV_NOPTS_VALUE) {

Reply via email to