summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-29 13:02:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-29 13:02:28 +0200
commit88262e1c1d5876ca031ea40901609e4e8d4d1f01 (patch)
treeaf5d7dd6de1806b420f6d2cdc7668eed6f7d3c9a /libavfilter/vf_fps.c
parentd49f2603bedb780a6cedff4ac790605679cf4029 (diff)
parentcb8f70c96e14c1b4824ef23d21d78d10fc5a4b93 (diff)
downloadffmpeg-88262e1c1d5876ca031ea40901609e4e8d4d1f01.tar.gz
Merge commit 'cb8f70c96e14c1b4824ef23d21d78d10fc5a4b93'
* commit 'cb8f70c96e14c1b4824ef23d21d78d10fc5a4b93': vf_fps: use double constants for default/min/max for start_time Conflicts: libavfilter/vf_fps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fps.c')
-rw-r--r--libavfilter/vf_fps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index ec77ccf722..c1ffc5213b 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -25,6 +25,8 @@
* a filter enforcing given constant framerate
*/
+#include <float.h>
+
#include "libavutil/common.h"
#include "libavutil/fifo.h"
#include "libavutil/mathematics.h"
@@ -61,7 +63,7 @@ typedef struct FPSContext {
#define F AV_OPT_FLAG_FILTERING_PARAM
static const AVOption fps_options[] = {
{ "fps", "A string describing desired output framerate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, { .str = "25" }, .flags = V|F },
- { "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = -9223372036854775808.0}, INT64_MIN, INT64_MAX, V },
+ { "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = DBL_MAX}, -DBL_MAX, DBL_MAX, V },
{ "round", "set rounding method for timestamps", OFFSET(rounding), AV_OPT_TYPE_INT, { .i64 = AV_ROUND_NEAR_INF }, 0, 5, V|F, "round" },
{ "zero", "round towards 0", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_ZERO }, 0, 5, V|F, "round" },
{ "inf", "round away from 0", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_INF }, 0, 5, V|F, "round" },
@@ -182,7 +184,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
if (ret < 0)
return ret;
- if (s->start_time != AV_NOPTS_VALUE) {
+ if (s->start_time != DBL_MAX) {
double first_pts = s->start_time * AV_TIME_BASE;
first_pts = FFMIN(FFMAX(first_pts, INT64_MIN), INT64_MAX);
s->first_pts = s->pts = av_rescale_q(first_pts, AV_TIME_BASE_Q,