summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-03 03:37:05 +0100
committerwm4 <wm4@nowhere>2015-01-03 03:37:05 +0100
commitbfac1e81a66fff8445022695001f2e8ea56ee0b5 (patch)
tree4f2e482188b46fcd28c65708c0cf409db9442002 /player/video.c
parent74be52b4ab8a2bfe3e99fddeba5b742524858f2e (diff)
downloadmpv-bfac1e81a66fff8445022695001f2e8ea56ee0b5.tar.bz2
mpv-bfac1e81a66fff8445022695001f2e8ea56ee0b5.tar.xz
vf_vapoursynth: pass through container FPS value
This is basically a hack; but apparently a needed one, since many vapoursynth filters insist on having a FPS set. We need to apply the FPS override before creating the filters. Also change some terminal output related to the FPS value.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/player/video.c b/player/video.c
index 2bb96abf5a..d2210b691d 100644
--- a/player/video.c
+++ b/player/video.c
@@ -180,6 +180,7 @@ static void recreate_video_filters(struct MPContext *mpctx)
d_video->vfilter->hwdec = d_video->hwdec_info;
d_video->vfilter->wakeup_callback = wakeup_playloop;
d_video->vfilter->wakeup_callback_ctx = mpctx;
+ d_video->vfilter->container_fps = d_video->fps;
vf_append_filter_list(d_video->vfilter, opts->vf_settings);
@@ -294,6 +295,13 @@ int reinit_video_chain(struct MPContext *mpctx)
d_video->fps = sh->video->fps;
d_video->vo = mpctx->video_out;
+ if (opts->force_fps) {
+ d_video->fps = opts->force_fps;
+ MP_INFO(mpctx, "FPS forced to %5.3f.\n", d_video->fps);
+ MP_INFO(mpctx, "Use --no-correct-pts to force FPS based timing.\n");
+ }
+ update_fps(mpctx);
+
vo_control(mpctx->video_out, VOCTRL_GET_HWDEC_INFO, &d_video->hwdec_info);
recreate_video_filters(mpctx);
@@ -317,16 +325,6 @@ int reinit_video_chain(struct MPContext *mpctx)
reset_video_state(mpctx);
reset_subtitle_state(mpctx);
- if (opts->force_fps) {
- d_video->fps = opts->force_fps;
- MP_INFO(mpctx, "FPS forced to be %5.3f.\n", d_video->fps);
- }
- if (!sh->video->fps && !opts->force_fps && !opts->correct_pts) {
- MP_ERR(mpctx, "FPS not specified in the "
- "header or invalid, use the -fps option.\n");
- }
- update_fps(mpctx);
-
return 1;
err_out: