summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorrslovers <rslovers@yandex.com>2017-06-07 13:58:12 +0000
committerwm4 <wm4@nowhere>2017-06-08 15:24:10 +0200
commit9821737d0611d3e1a4a3ede40bd796f49a6e3445 (patch)
tree44db1ac85549d39882fe7f66192ca8bf889bba6e /player
parentbd603c2997a3e8a292b4a9733fcfe0cd8abaff5c (diff)
downloadmpv-9821737d0611d3e1a4a3ede40bd796f49a6e3445.tar.bz2
mpv-9821737d0611d3e1a4a3ede40bd796f49a6e3445.tar.xz
vo_drm: fallback to vo_wait_default if VT switcher is not available
When the drm video output is used under VT with a terminal multiplexer like screen, the VT_SETMODE ioctl call will fail since the controlling terminal is a pseudoterminal instead of a real one, thus the VT switcher will be unavailable. The problem is, the wait_events function inside vo_drm.c will test for this, and will do nothing if the switcher is not active. Normally, this would not be noticed, however, when you pause a video, or if you're playing multiple image files, mpv will suddenly start busy waiting on a single core. I confirmed this by building mpv with gprof support, in a few seconds, wait_events got called about 90 million times. So I added a fallback, when the VT switcher is not availble, just use the vo_wait_default function. I tested it and it's working well so far.
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions