aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/timecode.c
diff options
context:
space:
mode:
authorGyan Doshi <gyandoshi@gmail.com>2018-02-22 18:04:42 +0530
committerMichael Niedermayer <michael@niedermayer.cc>2018-02-23 01:53:34 +0100
commitb6652f5100af48141dadcc45b087cf75eadc145e (patch)
treeb4f6e66809e966e68bb93eeaddc07ad9e3c2e832 /libavutil/timecode.c
parentce8a12fb72271a6e4f50ffcb360e7fdac6eccdcb (diff)
downloadffmpeg-b6652f5100af48141dadcc45b087cf75eadc145e.tar.gz
avutil/timecode: fix starting frame number for 59.94 fps
The existing code for adjusting starting frame number assumes 29.97 as stream fps. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/timecode.c')
-rw-r--r--libavutil/timecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/timecode.c b/libavutil/timecode.c
index e9d8504ee7..60077ba0c0 100644
--- a/libavutil/timecode.c
+++ b/libavutil/timecode.c
@@ -214,7 +214,7 @@ int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *st
tc->start = (hh*3600 + mm*60 + ss) * tc->fps + ff;
if (tc->flags & AV_TIMECODE_FLAG_DROPFRAME) { /* adjust frame number */
int tmins = 60*hh + mm;
- tc->start -= 2 * (tmins - tmins/10);
+ tc->start -= (tc->fps == 30 ? 2 : 4) * (tmins - tmins/10);
}
return 0;
}