Unverified Commit 5606fe89 authored by Franz Pletz's avatar Franz Pletz
Browse files

mpv: 0.38.0 -> 0.39.0

parent aab25b64
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
--- a/osdep/mac/input_helper.swift
+++ b/osdep/mac/input_helper.swift
@@ -18,6 +18,14 @@
 import Cocoa
 import Carbon.HIToolbox
 
+extension NSCondition {
+    fileprivate func withLock<T>(_ body: () throws -> T) rethrows -> T {
+        self.lock()
+        defer { self.unlock() }
+        return try body()
+    }
+}
+
 class InputHelper: NSObject {
     var option: OptionHelper?
     var lock = NSCondition()
--- a/audio/out/ao_avfoundation.m
+++ b/audio/out/ao_avfoundation.m
@@ -312,7 +312,8 @@

+    #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
     p->observer = [[AVObserver alloc] initWithAO:ao];
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
     [center addObserver:p->observer selector:@selector(handleRestartNotification:) name:AVSampleBufferAudioRendererOutputConfigurationDidChangeNotification object:p->renderer];
     [center addObserver:p->observer selector:@selector(handleRestartNotification:) name:AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification object:p->renderer];
-
+    #endif
     return CONTROL_OK;
+2 −10
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ let
in
stdenv'.mkDerivation (finalAttrs: {
  pname = "mpv";
  version = "0.38.0";
  version = "0.39.0";

  outputs = [
    "out"
@@ -148,14 +148,9 @@ stdenv'.mkDerivation (finalAttrs: {
    owner = "mpv-player";
    repo = "mpv";
    rev = "v${finalAttrs.version}";
    hash = "sha256-dFajnCpGlNqUv33A8eFEn8kjtzIPkcBY5j0gNVlaiIY=";
    hash = "sha256-BOGh+QBTO7hrHohh+RqjSF8eHQH8jVBPjG/k4eyFaaM=";
  };

  patches = [
    # Fix build with Darwin SDK 11
    ./0001-fix-darwin-build.patch
  ];

  postPatch = lib.concatStringsSep "\n" [
    # Don't reference compile time dependencies or create a build outputs cycle
    # between out and dev
@@ -315,9 +310,6 @@ stdenv'.mkDerivation (finalAttrs: {
      popd
      pushd $out/share/applications

      # patch out smb protocol reference, since our ffmpeg can't handle it
      substituteInPlace mpv.desktop --replace-fail "smb," ""

      sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \
        mpv.desktop > umpv.desktop
      printf "NoDisplay=true\n" >> umpv.desktop