From 7889e38f21a4ed65f020a1805b799478f1ad6e55 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 4 Mar 2013 22:21:57 +0100 Subject: Remove vo_fps global variable This is needed by the encode stuff for some reason, so we have to explicitly pass it. Functionality shouldn't change. --- core/encode_lavc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/encode_lavc.c') diff --git a/core/encode_lavc.c b/core/encode_lavc.c index 070b806253..9bb1abcdcd 100644 --- a/core/encode_lavc.c +++ b/core/encode_lavc.c @@ -365,6 +365,11 @@ void encode_lavc_finish(struct encode_lavc_context *ctx) ctx->finished = true; } +void encode_lavc_set_video_fps(struct encode_lavc_context *ctx, float fps) +{ + ctx->vo_fps = fps; +} + static void encode_2pass_prepare(struct encode_lavc_context *ctx, AVDictionary **dictp, AVStream *stream, struct stream **bytebuf, @@ -458,8 +463,8 @@ AVStream *encode_lavc_alloc_stream(struct encode_lavc_context *ctx, if (ctx->options->fps > 0) r = av_d2q(ctx->options->fps, ctx->options->fps * 1001 + 2); - else if (ctx->options->autofps && vo_fps > 0) { - r = av_d2q(vo_fps, vo_fps * 1001 + 2); + else if (ctx->options->autofps && ctx->vo_fps > 0) { + r = av_d2q(ctx->vo_fps, ctx->vo_fps * 1001 + 2); mp_msg( MSGT_ENCODE, MSGL_INFO, "vo-lavc: option -ofps not specified " "but -oautofps is active, using guess of %u/%u\n", -- cgit v1.2.3