summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/timecode.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-09-30 10:40:30 -0500
committertrav90 <travawine@palemoon.org>2018-09-30 10:40:30 -0500
commitedc124b92beccd55e5277062e95efb62a8b3ec7b (patch)
tree3486b32f85152ff76b1bee03a8d84b3c34c70a5f /media/ffvpx/libavutil/timecode.c
parent8ba6dd1bd12a3d13f9e2c683216dd8778011a72e (diff)
downloadUXP-edc124b92beccd55e5277062e95efb62a8b3ec7b.tar
UXP-edc124b92beccd55e5277062e95efb62a8b3ec7b.tar.gz
UXP-edc124b92beccd55e5277062e95efb62a8b3ec7b.tar.lz
UXP-edc124b92beccd55e5277062e95efb62a8b3ec7b.tar.xz
UXP-edc124b92beccd55e5277062e95efb62a8b3ec7b.zip
[ffvpx] Update ffvp9/ffvp8 to release 4.0.2
Diffstat (limited to 'media/ffvpx/libavutil/timecode.c')
-rw-r--r--media/ffvpx/libavutil/timecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/ffvpx/libavutil/timecode.c b/media/ffvpx/libavutil/timecode.c
index c0c67c847..60077ba0c 100644
--- a/media/ffvpx/libavutil/timecode.c
+++ b/media/ffvpx/libavutil/timecode.c
@@ -155,7 +155,7 @@ static int check_fps(int fps)
static int check_timecode(void *log_ctx, AVTimecode *tc)
{
if ((int)tc->fps <= 0) {
- av_log(log_ctx, AV_LOG_ERROR, "Timecode frame rate must be specified\n");
+ av_log(log_ctx, AV_LOG_ERROR, "Valid timecode frame rate must be specified. Minimum value is 1\n");
return AVERROR(EINVAL);
}
if ((tc->flags & AV_TIMECODE_FLAG_DROPFRAME) && tc->fps != 30 && tc->fps != 60) {
@@ -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;
}