Skip to content

Commit

Permalink
Fix another YDL bug
Browse files Browse the repository at this point in the history
  • Loading branch information
clsid2 committed Jun 27, 2022
1 parent 82d5307 commit 4f989c3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/mpc-hc/YoutubeDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f989c3

Please sign in to comment.