{"push_id":948955569,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"a16040528459844d304d39c7d567ced86565ae06","before":"266d8368e82bbede6a087b6c83a1066fc5d91b9c","commits":[{"sha":"a16040528459844d304d39c7d567ced86565ae06","author":{"email":"af2b84f09c8719e0f2b649c9464c0e4e09337b2e@nowhere","name":"wm4"},"message":"vdpau: force driver to report preemption early\n\nAnother fix for the crazy and insane nvidia preemption behavior.\n\nThis time, the situation is that we are using vo_opengl with vdpau\ninterop, and that vdpau got preempted in the background while mpv was\nsitting idly. This can be e.g. reproduced by using:\n\n   --force-window=immediate --idle --hwdec=vdpau\n\nand switching VTs. Then after switching back, load a video file.\n\nThis will not let mp_vdpau_handle_preemption() perform preemption\nrecovery, simply because it will do so only once vdp_decoder_create()\nhas been called. There are some other API calls which trigger\npreemption, but many don't.\n\nDue to the way the libavcodec API works, vdp_decoder_create() is way too\nlate. It does so when get_format returns. It notices creating the\ndecoder fails, and continues calling get_format without the vdpau\nformat. We could perhaps force it to reinit again (by adding a call to\nvdpau.c, that checks for preemption, and sets hwdec_request_reinit), but\nthis seems too much of a mess.\n\nSolve it by calling API in mp_vdpau_handle_preemption() that empirically\ndoes trigger preemption: output_surface_put_bits_native(). This call is\nuseless, and in fact should be doing nothing (empty update VdpRect).\nThere's the slight chance that in theory it will slow down operation,\nbut in practice it's bound to be harmless. It's the likely cheapest and\nsimplest API call I've found that can trigger the fallback this way.\n(The driver is closed source, so it was up to trial & error.)\n\nAlso, when initializing decoding, allow initial preemption recovery,\nwhich is needed to pass the test mention above.","distinct":true,"url":"https://api.github.com/repos/mpv-player/mpv/commits/a16040528459844d304d39c7d567ced86565ae06"}]}