diff options
author | wm4 <wm4@nowhere> | 2018-03-13 12:54:48 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-03-15 23:13:53 -0700 |
commit | 290341c77765ecbd44beedbd50f18f45638b78db (patch) | |
tree | 1fab9f538f903ad3856393be11f90654703efac1 /video/out/vo.c | |
parent | e42a194062cb29e538f19d12902c1610c1b30aef (diff) | |
download | mpv-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 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 7db43eaa44..a221ed9bb9 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -164,7 +164,6 @@ struct vo_internal { double display_fps; double reported_display_fps; - int opt_framedrop; }; extern const struct m_sub_options gl_video_conf; @@ -531,9 +530,6 @@ static void update_display_fps(struct vo *vo) pthread_mutex_unlock(&in->lock); - mp_read_option_raw(vo->global, "framedrop", &m_option_type_choice, - &in->opt_framedrop); - double fps = 0; vo->driver->control(vo, VOCTRL_GET_DISPLAY_FPS, &fps); @@ -851,7 +847,7 @@ bool vo_render_frame_external(struct vo *vo) in->dropped_frame &= !frame->display_synced; in->dropped_frame &= !(vo->driver->caps & VO_CAP_FRAMEDROP); - in->dropped_frame &= (in->opt_framedrop & 1); + in->dropped_frame &= frame->can_drop; // Even if we're hopelessly behind, rather degrade to 10 FPS playback, // instead of just freezing the display forever. in->dropped_frame &= now - in->prev_vsync < 100 * 1000; |