diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 20:40:00 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 20:40:00 +0100 |
commit | a4cd057bc7ddd2dd094d2ae7b0d6843ade95a626 (patch) | |
tree | 8969e023af3c691a342db51cea7d3096e81fec5f /libavformat/matroskaenc.c | |
parent | d302853bcabf47c53c47abb4714d5bc7c01f0b0b (diff) | |
download | ffmpeg-a4cd057bc7ddd2dd094d2ae7b0d6843ade95a626.tar.gz |
avformat/matroskaenc: Use the correct data type for the chapter times
Fixes potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 80f7d7f9c3..0051b9f509 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1074,8 +1074,8 @@ static int mkv_write_chapters(AVFormatContext *s) for (i = 0; i < s->nb_chapters; i++) { ebml_master chapteratom, chapterdisplay; AVChapter *c = s->chapters[i]; - int chapterstart = av_rescale_q(c->start, c->time_base, scale); - int chapterend = av_rescale_q(c->end, c->time_base, scale); + int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale); + int64_t chapterend = av_rescale_q(c->end, c->time_base, scale); AVDictionaryEntry *t = NULL; if (chapterstart < 0 || chapterstart > chapterend) return AVERROR_INVALIDDATA; |