Commit 2f3a3a7e authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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

Fixes ticket #6671.
parent 5cb70381
...@@ -3167,7 +3167,7 @@ static void compute_chapters_end(AVFormatContext *s) ...@@ -3167,7 +3167,7 @@ static void compute_chapters_end(AVFormatContext *s)
if (j != i && next_start > ch->start && next_start < end) if (j != i && next_start > ch->start && next_start < end)
end = next_start; end = next_start;
} }
ch->end = (end == INT64_MAX) ? ch->start : end; ch->end = (end == INT64_MAX || end < ch->start) ? ch->start : end;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment