diff options
Diffstat (limited to 'libavfilter/vf_fps.c')
-rw-r--r-- | libavfilter/vf_fps.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index fbc4d87966..71c30ccdff 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -1,18 +1,22 @@ /* - * This file is part of Libav. + * Copyright 2007 Bobby Bingham + * Copyright 2012 Robert Nagy <ronag89 gmail com> + * Copyright 2012 Anton Khirnov <anton khirnov net> * - * Libav is free software; you can redistribute it and/or + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -51,24 +55,19 @@ typedef struct FPSContext { #define OFFSET(x) offsetof(FPSContext, x) #define V AV_OPT_FLAG_VIDEO_PARAM -static const AVOption options[] = { +static const AVOption fps_options[] = { { "fps", "A string describing desired output framerate", OFFSET(fps), AV_OPT_TYPE_STRING, { .str = "25" }, .flags = V }, { NULL }, }; -static const AVClass class = { - .class_name = "FPS filter", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; +AVFILTER_DEFINE_CLASS(fps); static av_cold int init(AVFilterContext *ctx, const char *args) { FPSContext *s = ctx->priv; int ret; - s->class = &class; + s->class = &fps_class; av_opt_set_defaults(s); if ((ret = av_set_options_string(s, args, "=", ":")) < 0) { @@ -116,6 +115,7 @@ static int config_props(AVFilterLink* link) FPSContext *s = link->src->priv; link->time_base = (AVRational){ s->framerate.den, s->framerate.num }; + link->frame_rate= s->framerate; link->w = link->src->inputs[0]->w; link->h = link->src->inputs[0]->h; s->pts = AV_NOPTS_VALUE; |