diff mbox series

[FFmpeg-devel,3/3] avutil/timecode: cosmetics on av_timecode_get_smpte_from_framenum

Message ID 20200720210439.1809-3-cus@passwd.hu
State New
Headers show
Series [FFmpeg-devel,1/3] avformat/dvenc: do not set binary group and biphase polarity flags
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Marton Balint July 20, 2020, 9:04 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavutil/timecode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/timecode.c b/libavutil/timecode.c
index cb916970ef..b528e4a510 100644
--- a/libavutil/timecode.c
+++ b/libavutil/timecode.c
@@ -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;
 }