diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2015-03-27 17:05:12 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-27 17:52:59 +0300 |
commit | dbce8cdacf0c610a69cbf0d2959d793957dd4dfa (patch) | |
tree | 10164c820e54396b805b3b8ec4a01b71f4825fa7 /libavfilter/vf_telecine.c | |
parent | 174330b18e63c212cc024eeca03297a76cdcdfa9 (diff) |
avfilter/vf_telecine: Avoid floating point values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_telecine.c')
-rw-r--r-- | libavfilter/vf_telecine.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 73447dfe4a..93e5aa9e44 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -41,7 +41,7 @@ typedef struct { int64_t start_time; AVRational pts; - double ts_unit; + AVRational ts_unit; int out_cnt; int occupied; @@ -164,7 +164,7 @@ static int config_output(AVFilterLink *outlink) av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n", inlink->time_base.num, inlink->time_base.den, outlink->time_base.num, outlink->time_base.den); - s->ts_unit = av_q2d(av_inv_q(av_mul_q(fps, outlink->time_base))); + s->ts_unit = av_inv_q(av_mul_q(fps, outlink->time_base)); return 0; } @@ -243,7 +243,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) av_frame_copy_props(frame, inpicref); frame->pts = ((s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time) + - outlink->frame_count * s->ts_unit; + av_rescale(outlink->frame_count, s->ts_unit.num, + s->ts_unit.den); ret = ff_filter_frame(outlink, frame); } av_frame_free(&inpicref); |