From 4f989c3b161bb5a8e55a7047e64002145bab3f67 Mon Sep 17 00:00:00 2001 From: clsid2 <4704996+clsid2@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:22:14 +0200 Subject: [PATCH] Fix another YDL bug --- src/mpc-hc/YoutubeDL.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/mpc-hc/YoutubeDL.cpp b/src/mpc-hc/YoutubeDL.cpp index 3ca30f8a867..f5a122e7c0d 100644 --- a/src/mpc-hc/YoutubeDL.cpp +++ b/src/mpc-hc/YoutubeDL.cpp @@ -305,42 +305,42 @@ void GetVideoScore(YDLStreamDetails& details) { } switch (s.iYDLVideoFormat) { - case YDL_FORMAT_H264_30: { + case YDL_FORMAT_H264_30: if (vcodec == _T("avc1")) score += 32; if (details.fps < 31) score += 8; - } - case YDL_FORMAT_H264_60: { + break; + case YDL_FORMAT_H264_60: if (vcodec == _T("avc1")) score += 32; if (details.fps >= 31) score += 8; - } - case YDL_FORMAT_VP9_30: { + break; + case YDL_FORMAT_VP9_30: if (vcodec == _T("vp9")) score += 32; else if (vcodec == _T("vp9.")) score += 16; if (details.fps < 31) score += 8; - } - case YDL_FORMAT_VP9_60: { + break; + case YDL_FORMAT_VP9_60: if (vcodec == _T("vp9")) score += 32; else if (vcodec == _T("vp9.")) score += 16; if (details.fps >= 31) score += 8; - } - case YDL_FORMAT_VP9P2_30: { + break; + case YDL_FORMAT_VP9P2_30: if (vcodec == _T("vp9")) score += 32; else if (details.vcodec == _T("vp9.2")) score += 32; if (details.fps < 31) score += 8; - } - case YDL_FORMAT_VP9P2_60: { + break; + case YDL_FORMAT_VP9P2_60: if (vcodec == _T("vp9")) score += 32; else if (details.vcodec == _T("vp9.2")) score += 32; if (details.fps >= 31) score += 8; - } - case YDL_FORMAT_AV1_30: { + break; + case YDL_FORMAT_AV1_30: if (vcodec == _T("av01")) score += 32; if (details.fps < 31) score += 8; - } - case YDL_FORMAT_AV1_60: { + break; + case YDL_FORMAT_AV1_60: if (vcodec == _T("av01")) score += 32; if (details.fps >= 31) score += 8; - } + break; } details.video_score = score;