You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avutil/timecode: Fix -Wformat-truncation warning
Using unsigned for fps is more natural since the corresponding AVTimecode field is unsigned. It also fixes a -Wformat-truncation warning from GCC 16: in case fps were negative, hours, minutes and seconds would be negative, leading to additional '-' characters which are not accounted for in AV_TIMECODE_STR_SIZE. Reviewed-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -103,7 +103,7 @@ uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss
|
||||
|
||||
char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum_arg)
|
||||
{
|
||||
int fps = tc->fps;
|
||||
unsigned fps = tc->fps;
|
||||
int drop = tc->flags & AV_TIMECODE_FLAG_DROPFRAME;
|
||||
int hh, mm, ss, ff, ff_len, neg = 0;
|
||||
int64_t framenum = framenum_arg;
|
||||
|
||||
Reference in New Issue
Block a user