summaryrefslogtreecommitdiffstats
path: root/core/encode_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-04 22:21:57 +0100
committerwm4 <wm4@nowhere>2013-03-04 22:21:57 +0100
commit7889e38f21a4ed65f020a1805b799478f1ad6e55 (patch)
treec63fc87cdf380117e8a2fbe035f11862c1c485c0 /core/encode_lavc.c
parent6ef1a1cddd9ae43c80a337b5224955735b987074 (diff)
downloadmpv-7889e38f21a4ed65f020a1805b799478f1ad6e55.tar.bz2
mpv-7889e38f21a4ed65f020a1805b799478f1ad6e55.tar.xz
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.
Diffstat (limited to 'core/encode_lavc.c')
-rw-r--r--core/encode_lavc.c9
1 files changed, 7 insertions, 2 deletions
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",