From 159eb3f962b845c861b5f10da35fcc12e1e6cb15 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 6 Dec 2015 19:20:23 +0100 Subject: win32: add option to set VO MMCSS profile This was requested. --- video/out/w32_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'video/out/w32_common.c') diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 217359a7b1..025b744838 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1327,7 +1327,11 @@ int vo_w32_init(struct vo *vo) // While the UI runs in its own thread, the thread in which this function // runs in will be the renderer thread. Apply magic MMCSS cargo-cult, // which might stop Windows from throttling clock rate and so on. - w32->avrt_handle = AvSetMmThreadCharacteristicsW(L"Playback", &(DWORD){0}); + if (vo->opts->mmcss_profile[0]) { + wchar_t *profile = mp_from_utf8(NULL, vo->opts->mmcss_profile); + w32->avrt_handle = AvSetMmThreadCharacteristicsW(profile, &(DWORD){0}); + talloc_free(profile); + } return 1; fail: -- cgit v1.2.3