提交 b6652f51 编写于 作者: G Gyan Doshi 提交者: Michael Niedermayer

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: NMichael Niedermayer <michael@niedermayer.cc>
上级 ce8a12fb
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册