-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Cannot apply video filters to multiple windows #4273
Comments
Reproduced for me. Sometimes it works. But I was able to trigger incorrect behavior with multiple windows. |
AnalysisThe primary problem can been seen in this line from func reloadTable() {
filters = PlayerCore.active.mpv.getFilters(filterType) The static var active: PlayerCore {
if let wc = NSApp.mainWindow?.windowController as? MainWindowController {
return wc.player
} else {
return first
}
} The problem with There is another way filters can be incorrectly applied. Stopping a mpv player core does not clear filters. IINA caches And there is a race condition can that cause a crash if a filter window is open when IINA is quitting. When IINA is terminating player windows are closed, which causes the iinaMainWindowChanged notification to be posted and that results in an observer establisted in Crash Report:
Although the crash had the potential to occur before, the changes to properly wait for mpv to shutdown has made it more likely for this crash to occur. For that reason I'm going to label this as a regression. Continuing to investigate… |
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down - Disable the ability to add a filter if the active core is stopping - Change PlayerCore.playbackStopped to clear all audio and video filters
FixingThe commit in the pull request will:
|
Let me first say that I generally agree with using the "last active" player when grabbing the list of filters for the "static" UI. I ended up settling on this approach when working with / displaying key bindings. Couple thoughts though:
|
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down - Disable the ability to add a filter if the active core is stopping if IINA is configured to support multiple windows - Change PlayerCore.playbackStopped to clear all audio and video filters if IINA is configured to support multiple windows
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down
Investigation into this issue uncovered multiple problems. A fix for two of the serious problems raised by this issue has been merged into the |
Two of the serious problems are fixed in the released version of IINA. The others are being handled as separate issues. |
macOS 13.2.1, IINA 1.3.1
Behavior:
When I open a video and apply some video filter to it, then open another video in a new window and try to apply any video filters to it, nothing happens in the current window and instead, the filters get applied to the first window.
Steps to reproduce:
Open some video, apply e.g. a crop filter crop=720:::
Then open another video in a new window and try to apply the same or any other filter, e.g. crop=1080:::
The text was updated successfully, but these errors were encountered: