aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Youtube.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-14 04:33:39 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-14 04:33:39 +0200
commit977547ff7f0b609291da56df32e5642d10c530cd (patch)
tree6955038ffa72ce6fc5fc32a28bbbec3f8edb9cfb /src/plugins/Youtube.cpp
parent642c58f95bdbe2b8d8ac3d52bdaa24e5e28e4e11 (diff)
Properly close the previous video when navigating to another video, for example when doing ctrl+i in a comment and then playing a video
Diffstat (limited to 'src/plugins/Youtube.cpp')
-rw-r--r--src/plugins/Youtube.cpp2
1 files changed, 1 insertions, 1 deletions
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;