Skip to content

Commit

Permalink
fix(darwin): rm black screen when switching videos
Browse files Browse the repository at this point in the history
  • Loading branch information
birros committed Aug 6, 2023
1 parent 9bac9dd commit a8dd6f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions media_kit_video/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- build(darwin): bump `mpv` headers to `0.36.0`
- build(darwin): use symlinks for `FRAMEWORK_SEARCH_PATHS`, `media_kit_libs_*** >= 1.1.0`
- fix(darwin): remove black screen when switching videos ([#332](https://github.com/media-kit/media-kit/issues/332))

## 1.1.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public class VideoOutput: NSObject {
height: Double(height)
)

if width == 0 || height == 0 {
return
}

if currentWidth != width || currentHeight != height {
currentWidth = width
currentHeight = height
Expand All @@ -141,10 +145,6 @@ public class VideoOutput: NSObject {
textureUpdateCallback(textureId, size)
}

if width == 0 || height == 0 {
return
}

if disposed {
return
}
Expand Down

0 comments on commit a8dd6f3

Please sign in to comment.