@@ -71,7 +71,7 @@ uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
{
uint32_t tc = 0;
- uint32_t frames;
+ int frames = ff;
/* For SMPTE 12-M timecodes, frame count is a special case if > 30 FPS.
See SMPTE ST 12-1:2014 Sec 12.1 for more info. */
@@ -83,8 +83,6 @@ uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss
else
tc |= (1 << 23);
}
- } else {
- frames = ff;
}
tc |= drop << 30;
@@ -95,7 +93,7 @@ uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss
tc |= (mm / 10) << 12;
tc |= (mm % 10) << 8;
tc |= (hh / 10) << 4;
- tc |= (hh % 10);
+ tc |= (hh % 10);
return tc;
}
Signed-off-by: Marton Balint <cus@passwd.hu> --- libavutil/timecode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)