[FFmpeg-cvslog] avformat/utils: Check end time in avpriv_new_chapter()
Michael Niedermayer
git at videolan.org
Fri May 23 05:10:18 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 23 04:33:05 2014 +0200| [220df143b962dd8ed65cee90bcff8565a28ee0e6] | committer: Michael Niedermayer
avformat/utils: Check end time in avpriv_new_chapter()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=220df143b962dd8ed65cee90bcff8565a28ee0e6
---
libavformat/utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8e79177..7e3ec9b 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];
More information about the ffmpeg-cvslog
mailing list