summaryrefslogtreecommitdiffstats
path: root/audio/out/push.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-21 22:04:25 +0200
committerwm4 <wm4@nowhere>2014-08-21 22:45:58 +0200
commitf1e78306cb0efab153e2580b45759cdf3c1482f2 (patch)
treede2b0505743291e8c024a74efd1f9f6932f864ba /audio/out/push.c
parent03f97e4caecc55de9d7ac0cde1ee9556a8ef4b6c (diff)
downloadmpv-f1e78306cb0efab153e2580b45759cdf3c1482f2.tar.bz2
mpv-f1e78306cb0efab153e2580b45759cdf3c1482f2.tar.xz
vaapi: try dealing with Intel's braindamaged shit drivers
So talking to a certain Intel dev, it sounded like modern VA-API drivers are reasonable thread-safe. But apparently that is not the case. Not at all. So add approximate locking around all vaapi API calls. The problem appeared once we moved decoding and display to different threads. That means the "vaapi-copy" mode was unaffected, but decoding with vo_vaapi or vo_opengl lead to random crashes. Untested on real Intel hardware. With the vdpau emulation, it seems to work fine - but actually it worked fine even before this commit, because vdpau was written and designed not by morons, but competent people (vdpau is guaranteed to be fully thread-safe). There is some probability that this commit doesn't fix things entirely. One problem is that locking might not be complete. For one, libavcodec _also_ accesses vaapi, so we have to rely on our own guesses how and when lavc uses vaapi (since we disable multithreading when doing hw decoding, our guess should be relatively good, but it's still a lavc implementation detail). One other reason that this commit might not help is Intel's amazing potential to fuckup anything that is good and holy.
Diffstat (limited to 'audio/out/push.c')
0 files changed, 0 insertions, 0 deletions