-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Work around freeze due to VP9 hardware decode, #4486 #4498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit will add code to MPVController.mpvInit that changes the value of the mpv option hwdec-codecs, removing VP9, if IINA is not running on a Mac with an Apple Silicon chip. This change works around the FFmpeg defect reported in ticket 9599.
I was at the eye doctor today, so eyes dilated and things are blurry. A critical review is needed. Especially the detection of Apple Silicon. Is there a better way to do that? So far we have not seen the problem under Apple Silicon. so the workaround is not applied when running on AS and VP9 hardware decoding is still used. Does this make sense, or should we always disable VP9 for now to be safe? |
Not really. Seems like there should be, but did some searching and yours appears to be the standard solution. Very typical to see Linux shell scripts rely on parsing the Have not tried running it yet, but looks like a good solution. +1 for adding a secret pref allowing the workaround to be disabled. Also, you should know the word "workaround" (with no space) is only used as a noun. It doesn't have an exact equivalent verb in common English, although you could use "work around". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other changes LGTM
iina/MPVController.swift
Outdated
Logger.log("Failed to construct string for sysinfo.machine", level: .error) | ||
return false | ||
} | ||
return machine.replacingOccurrences(of: "\0", with: "") == "arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest use machine.starts(with: "arm64")
, which is not only more robust but also more elegant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Uploaded a new commit with this change.
This commit will add code to MPVController.mpvInit that changes the value of the mpv option hwdec-codecs, removing VP9, if IINA is not running on a Mac with an Apple Silicon chip. This change works around the FFmpeg defect reported in ticket 9599.
On this:
I thought about that, but instead I made sure that if this mpv option is set in I was wondering if we should have an internal preference that by passes the check for Apple Silicon and always applies the workaround. Just in case we find it also has trouble on Apple Silicon machines. I did not do that as so far I have not been able trigger a problem on my M1 machine. |
This commit will add code to MPVController.mpvInit that changes the value of the mpv option hwdec-codecs, removing VP9, if IINA is not running on a Mac with an Apple Silicon chip. This change works around the FFmpeg defect reported in ticket 9599.
Description: