From 977547ff7f0b609291da56df32e5642d10c530cd Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 14 Jun 2021 04:33:39 +0200 Subject: Properly close the previous video when navigating to another video, for example when doing ctrl+i in a comment and then playing a video --- src/plugins/Youtube.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/Youtube.cpp') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index ce7e8fa..49d7b83 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -1867,7 +1867,7 @@ namespace QuickMedia { const YoutubeVideoFormat *best_mp4 = get_highest_resolution_mp4_non_av1(video_formats, max_height); const YoutubeVideoFormat *best_non_mp4 = get_highest_resolution_non_mp4(video_formats, max_height); // We prefer mp4 (h264) because it has the best hardware decoding support - if(best_mp4 && (!best_non_mp4 || best_mp4->height >= best_non_mp4->height)) { + if(best_mp4 && (!best_non_mp4 || (best_mp4->height >= best_non_mp4->height && best_mp4->fps >= best_non_mp4->fps))) { print_chosen_format(*best_mp4); has_embedded_audio = best_mp4->has_embedded_audio; return best_mp4->base.url; -- cgit v1.2.3