aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-01 13:17:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-01 13:55:30 +0200
commit1a94d7c7c8ca2164c2a1e7d6f1fe7868b01e7e43 (patch)
treeda8e0c221cafd26fb39b739719215a1a96a12d35 /libavfilter
parent24939d567b8a292c8c9d803fa1d44f00c1a29575 (diff)
downloadffmpeg-1a94d7c7c8ca2164c2a1e7d6f1fe7868b01e7e43.tar.gz
avfilter/trim: improve rounding precission
Note, the design is still flawed, dont expect this to be frame accurate. float/double first needs to be removed and frames itself trimmed instead of drop vs nodrop Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/trim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/trim.c b/libavfilter/trim.c
index 1ac33e9d40..34963ae2f2 100644
--- a/libavfilter/trim.c
+++ b/libavfilter/trim.c
@@ -89,17 +89,17 @@ static int config_input(AVFilterLink *inlink)
inlink->time_base : (AVRational){ 1, inlink->sample_rate };
if (s->start_time != DBL_MAX) {
- int64_t start_pts = lrintf(s->start_time / av_q2d(tb));
+ int64_t start_pts = lrint(s->start_time / av_q2d(tb));
if (s->start_pts == AV_NOPTS_VALUE || start_pts < s->start_pts)
s->start_pts = start_pts;
}
if (s->end_time != DBL_MAX) {
- int64_t end_pts = lrintf(s->end_time / av_q2d(tb));
+ int64_t end_pts = lrint(s->end_time / av_q2d(tb));
if (s->end_pts == AV_NOPTS_VALUE || end_pts > s->end_pts)
s->end_pts = end_pts;
}
if (s->duration)
- s->duration_tb = lrintf(s->duration / av_q2d(tb));
+ s->duration_tb = lrint(s->duration / av_q2d(tb));
return 0;
}