提交 220df143 编写于 作者: M Michael Niedermayer

avformat/utils: Check end time in avpriv_new_chapter()

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 744df0a0
......@@ -3789,6 +3789,11 @@ AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
AVChapter *chapter = NULL;
int i;
if (end != AV_NOPTS_VALUE && start > end) {
av_log(s, AV_LOG_ERROR, "Chapter end time %"PRId64" before start %"PRId64"\n", end, start);
return NULL;
}
for (i = 0; i < s->nb_chapters; i++)
if (s->chapters[i]->id == id)
chapter = s->chapters[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册