forked from FFmpeg/FFmpeg
avutil/timecode: Avoid fps overflow in av_timecode_get_smpte_from_framenum()
Fix from c94875471e
Found-by: Youngjae Choi <youngjaechoi@korea.ac.kr>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f1ddba24a0
commit
6ba33b50f5
1 changed files with 2 additions and 2 deletions
|
@ -61,8 +61,8 @@ uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
|
|||
framenum = av_timecode_adjust_ntsc_framenum2(framenum, tc->fps);
|
||||
ff = framenum % fps;
|
||||
ss = framenum / fps % 60;
|
||||
mm = framenum / (fps*60) % 60;
|
||||
hh = framenum / (fps*3600) % 24;
|
||||
mm = framenum / (fps*60LL) % 60;
|
||||
hh = framenum / (fps*3600LL) % 24;
|
||||
return av_timecode_get_smpte(tc->rate, drop, hh, mm, ss, ff);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue