Skip to content

Commit c1f063a

Browse files
authored
Merge pull request #46 from ua0lnj/master
sync
2 parents 292d029 + 678df06 commit c1f063a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ cMpvControl::cMpvControl(string Filename, bool Shuffle)
3535
Player->SetWindowSize(w, h, x, y);
3636
xcb_flush(connect);
3737
connect = NULL;
38-
}
38+
} else Player->SetWindowSize(0, 0, 0, 0);
3939
}
4040
cStatus::MsgReplaying(this, Filename.c_str(), Filename.c_str(), true);
4141
}

player.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,11 @@ void cMpvPlayer::PlayerStart()
625625
check_error(mpv_set_option_string(hMpv, "alang", MpvPluginConfig->Languages.c_str()));
626626
check_error(mpv_set_option_string(hMpv, "cache", "no")); // video stutters if enabled
627627
check_error(mpv_set_option_string(hMpv, "sub-visibility", MpvPluginConfig->ShowSubtitles ? "yes" : "no"));
628+
#if MPV_CLIENT_API_VERSION < MPV_MAKE_VERSION(2,2)
628629
check_error(mpv_set_option_string(hMpv, "sub-forced-only", "yes"));
630+
#else
631+
check_error(mpv_set_option_string(hMpv, "sub-forced-events-only", "yes"));
632+
#endif
629633
check_error(mpv_set_option_string(hMpv, "sub-auto", "all"));
630634
check_error(mpv_set_option_string(hMpv, "hr-seek", "yes"));
631635
check_error(mpv_set_option_string(hMpv, "write-filename-in-watch-later-config", "yes"));
@@ -642,7 +646,6 @@ void cMpvPlayer::PlayerStart()
642646
#ifdef DEBUG
643647
check_error(mpv_set_option_string(hMpv, "log-file", "/var/log/mpv"));
644648
#endif
645-
646649
if (MpvPluginConfig->UsePassthrough)
647650
{
648651
check_error(mpv_set_option_string(hMpv, "audio-spdif", "ac3,dts"));

0 commit comments

Comments
 (0)