diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-23 06:33:05 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-23 06:33:05 +0400 |
commit | 220df143b962dd8ed65cee90bcff8565a28ee0e6 (patch) | |
tree | 4da5a2f48db5a5c31d0abfb339af2f4ecac5a6cf /libavformat/utils.c | |
parent | 744df0a0319c82cf0da8fdb167255516853f1238 (diff) |
avformat/utils: Check end time in avpriv_new_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 8e791776fb..7e3ec9b859 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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]; |