summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-03-13 12:54:48 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-15 23:13:53 -0700
commit290341c77765ecbd44beedbd50f18f45638b78db (patch)
tree1fab9f538f903ad3856393be11f90654703efac1 /player/video.c
parente42a194062cb29e538f19d12902c1610c1b30aef (diff)
downloadmpv-290341c77765ecbd44beedbd50f18f45638b78db.tar.bz2
mpv-290341c77765ecbd44beedbd50f18f45638b78db.tar.xz
vo: pass through framedrop flag differently
There is some sort-of awkwardness here, because option access needs to happen in a synchronized manner, and the framedrop flag is not in the VO option struct. Remove the mp_read_option_raw() call and the awkward change notification via VO_EVENT_WIN_STATE from command.c, and pass it through as new vo_frame flag.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index e91c4ce631..7ec05e0f6d 100644
--- a/player/video.c
+++ b/player/video.c
@@ -777,7 +777,7 @@ static void handle_display_sync_frame(struct MPContext *mpctx,
mode == VS_DISP_RESAMPLE_NONE;
bool drop = mode == VS_DISP_VDROP || mode == VS_DISP_RESAMPLE ||
mode == VS_DISP_ADROP || mode == VS_DISP_RESAMPLE_VDROP;
- drop &= (opts->frame_dropping & 1);
+ drop &= frame->can_drop;
if (resample && using_spdif_passthrough(mpctx))
return;
@@ -1109,6 +1109,7 @@ void write_video(struct MPContext *mpctx)
.pts = pts,
.duration = -1,
.still = mpctx->step_frames > 0,
+ .can_drop = opts->frame_dropping & 1,
.num_frames = MPMIN(mpctx->num_next_frames, req),
.num_vsyncs = 1,
};