History

avformat/matroskaenc: Use the correct data type for the chapter times

Fixes potential integer overflow

Michael Niedermayer committed 11 years ago

Commit a4cd0571 parent d3028531 file · +2 −2Browse files

Unified · Split

libavformat/matroskaenc.c+2−2
@@ -1074,8 +1074,8 @@ static int mkv_write_chapters(AVFormatContext *s) · 1073 unmodified lines
10741074 for (i = 0; i < s->nb_chapters; i++) {
10751075 ebml_master chapteratom, chapterdisplay;
10761076 AVChapter *c = s->chapters[i];
1077− int chapterstart = av_rescale_q(c->start, c->time_base, scale);
1078− int chapterend = av_rescale_q(c->end, c->time_base, scale);
1077+ int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale);
1078+ int64_t chapterend = av_rescale_q(c->end, c->time_base, scale);
10791079 AVDictionaryEntry *t = NULL;
10801080 if (chapterstart < 0 || chapterstart > chapterend)
10811081 return AVERROR_INVALIDDATA;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t