Browse Source

MVK: update libvlc and stage 2 patches solving prominent crashes

Felix Paul Kühne 7 years ago
parent
commit
6c34d8c91d
20 changed files with 110 additions and 37 deletions
  1. 2 2
      Resources/MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch
  2. 2 2
      Resources/MobileVLCKit/patches/0002-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch
  3. 2 2
      Resources/MobileVLCKit/patches/0003-arm_neon-work-around-libtool-issue.patch
  4. 2 2
      Resources/MobileVLCKit/patches/0004-arm_neon-fix-iOS-linking.patch
  5. 2 2
      Resources/MobileVLCKit/patches/0005-disable-neon-volume-plugin.patch
  6. 2 2
      Resources/MobileVLCKit/patches/0006-libvlc-create-VT-zero-copy-variable.patch
  7. 2 2
      Resources/MobileVLCKit/patches/0007-Enable-System-DL.patch
  8. 2 2
      Resources/MobileVLCKit/patches/0008-deinterlace-merge-arm64-fix-linking-on-appleOS.patch
  9. 4 4
      Resources/MobileVLCKit/patches/0009-http-add-vlc_http_cookies_clear.patch
  10. 2 2
      Resources/MobileVLCKit/patches/0010-libvlc_media-add-cookie_jar-API.patch
  11. 2 2
      Resources/MobileVLCKit/patches/0011-Revert-Contribs-update-libpng-to-1.6.29.patch
  12. 2 2
      Resources/MobileVLCKit/patches/0012-contrib-gcrypt-work-around-a-libtool-limitation.patch
  13. 2 2
      Resources/MobileVLCKit/patches/0013-contrib-gcrypt-fix-tvOS-compilation.patch
  14. 2 2
      Resources/MobileVLCKit/patches/0014-contrib-gcrypt-update-patches.patch
  15. 2 2
      Resources/MobileVLCKit/patches/0015-contrib-avcodec-enforce-use-of-FFmpeg.patch
  16. 2 2
      Resources/MobileVLCKit/patches/0016-build-rename-exported-symbols-by-module.patch
  17. 2 2
      Resources/MobileVLCKit/patches/0017-Remove-thread-local.patch
  18. 35 0
      Resources/MobileVLCKit/patches/0018-vout-iOS-don-t-draw-if-the-app-is-not-active.patch
  19. 38 0
      Resources/MobileVLCKit/patches/0019-audio-unit-iOS-add-missing-notification-center-remov.patch
  20. 1 1
      buildMobileVLCKit.sh

+ 2 - 2
Resources/MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch

@@ -1,7 +1,7 @@
-From ac7f0b7674a805e9125d44b8aa1266e18def0019 Mon Sep 17 00:00:00 2001
+From dc83d0d1be783cf959a15cff10a276981a3302cc Mon Sep 17 00:00:00 2001
 From: David Geldreich <david.geldreich@free.fr>
 Date: Fri, 20 Apr 2012 16:41:19 +0200
-Subject: [PATCH 01/17] arm_neon: added function macro to handle the underscore
+Subject: [PATCH 01/19] arm_neon: added function macro to handle the underscore
  prefix for the iOS ARM ABI
 
 ---

+ 2 - 2
Resources/MobileVLCKit/patches/0002-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch

@@ -1,7 +1,7 @@
-From d17e36ce990cf3ad8072056b74277e6e4752f74a Mon Sep 17 00:00:00 2001
+From 8857a3f985196615733b5b2b4b7ded938656060a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 10 Aug 2012 16:02:07 +0200
-Subject: [PATCH 02/17] deinterlace/merge: use a macro to fix compilation for
+Subject: [PATCH 02/19] deinterlace/merge: use a macro to fix compilation for
  iOS
 
 ---

+ 2 - 2
Resources/MobileVLCKit/patches/0003-arm_neon-work-around-libtool-issue.patch

@@ -1,7 +1,7 @@
-From a5ac626e959d59b24269389a55612563d6850201 Mon Sep 17 00:00:00 2001
+From 7195839b753589887a7fe68b3114e6dca056f660 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Thu, 18 Dec 2014 22:14:55 +0100
-Subject: [PATCH 03/17] arm_neon: work-around libtool issue
+Subject: [PATCH 03/19] arm_neon: work-around libtool issue
 
 ---
  modules/arm_neon/Makefile.am | 2 ++

+ 2 - 2
Resources/MobileVLCKit/patches/0004-arm_neon-fix-iOS-linking.patch

@@ -1,7 +1,7 @@
-From 2cc2df2f84b231d09f377489b818d20cf2a2a825 Mon Sep 17 00:00:00 2001
+From 6778d1e3a21454f9370dd7c6680996afb6c15e50 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 10 Dec 2014 22:14:55 +0100
-Subject: [PATCH 04/17] arm_neon: fix iOS linking
+Subject: [PATCH 04/19] arm_neon: fix iOS linking
 
 ---
  modules/arm_neon/amplify.S              |  7 ++---

+ 2 - 2
Resources/MobileVLCKit/patches/0005-disable-neon-volume-plugin.patch

@@ -1,7 +1,7 @@
-From 93ad47dc832a65dad51dafb0d4474c2229bc7bfa Mon Sep 17 00:00:00 2001
+From 12d5c762ab23c5ad241efde28ca8797ccf1265eb Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 10 Dec 2014 22:14:55 +0100
-Subject: [PATCH 05/17] disable neon volume plugin
+Subject: [PATCH 05/19] disable neon volume plugin
 
 ---
  modules/arm_neon/Makefile.am | 1 -

+ 2 - 2
Resources/MobileVLCKit/patches/0006-libvlc-create-VT-zero-copy-variable.patch

@@ -1,7 +1,7 @@
-From 5be20b69c165cafca93a5c04f804c1169ca95fc5 Mon Sep 17 00:00:00 2001
+From fd25a2a025b833668d65424f33cc5b566ce5fe85 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 4 May 2016 16:00:40 +0200
-Subject: [PATCH 06/17] libvlc: create VT-zero-copy variable
+Subject: [PATCH 06/19] libvlc: create VT-zero-copy variable
 
 ---
  lib/media_player.c | 1 +

+ 2 - 2
Resources/MobileVLCKit/patches/0007-Enable-System-DL.patch

@@ -1,7 +1,7 @@
-From 36f8bf5504b5f3a9834cc762fc96a1415f49965a Mon Sep 17 00:00:00 2001
+From 63692993a118b690e54752df6e0801b9953a3f07 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 22 Jul 2016 11:11:44 +0200
-Subject: [PATCH 07/17] Enable System DL
+Subject: [PATCH 07/19] Enable System DL
 
 ---
  contrib/src/ffmpeg/patch-as-patch-can.patch | 20 ++++++++++++++++++++

+ 2 - 2
Resources/MobileVLCKit/patches/0008-deinterlace-merge-arm64-fix-linking-on-appleOS.patch

@@ -1,7 +1,7 @@
-From 3eec1fa79290a02403f4215e71dfe6e53f86eb62 Mon Sep 17 00:00:00 2001
+From 5e66522c82d843c1acd6f2694cd1072cdc8b808f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 12 Sep 2016 17:04:05 +0200
-Subject: [PATCH 08/17] deinterlace-merge-arm64: fix linking on appleOS
+Subject: [PATCH 08/19] deinterlace-merge-arm64: fix linking on appleOS
 
 ---
  modules/arm_neon/asm64.S                       | 46 ++++++++++++++++++++++++++

+ 4 - 4
Resources/MobileVLCKit/patches/0009-http-add-vlc_http_cookies_clear.patch

@@ -1,7 +1,7 @@
-From e1adf49e7540fa54649923cb905cf536f1953c04 Mon Sep 17 00:00:00 2001
+From 6d2901cc0bc327284302114d3aa26791f9136428 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Fri, 16 Sep 2016 15:51:10 +0200
-Subject: [PATCH 09/17] http: add vlc_http_cookies_clear
+Subject: [PATCH 09/19] http: add vlc_http_cookies_clear
 
 Clear all cookies without deleting the jar.
 ---
@@ -23,10 +23,10 @@ index ed7e1613da..da1fe4ef1a 100644
  
  /**
 diff --git a/src/libvlccore.sym b/src/libvlccore.sym
-index f9a82d7a51..63fa306977 100644
+index 929a6dcc1f..d8bac07a97 100644
 --- a/src/libvlccore.sym
 +++ b/src/libvlccore.sym
-@@ -130,6 +130,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
+@@ -131,6 +131,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
  vlc_http_auth_FormatAuthorizationHeader
  vlc_http_cookies_new
  vlc_http_cookies_destroy

+ 2 - 2
Resources/MobileVLCKit/patches/0010-libvlc_media-add-cookie_jar-API.patch

@@ -1,7 +1,7 @@
-From d7cadd36253d9a1010a60b7f93fc35420b848b9f Mon Sep 17 00:00:00 2001
+From 0193040f7b2e76578b705556b3a1cdb4dd56a733 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Fri, 16 Sep 2016 15:51:11 +0200
-Subject: [PATCH 10/17] libvlc_media: add cookie_jar API
+Subject: [PATCH 10/19] libvlc_media: add cookie_jar API
 
 ---
  include/vlc/libvlc_media.h | 35 +++++++++++++++++++++++++++++++++++

+ 2 - 2
Resources/MobileVLCKit/patches/0011-Revert-Contribs-update-libpng-to-1.6.29.patch

@@ -1,7 +1,7 @@
-From e96c5ee1308c5c8663d6bc10be670cd120dee155 Mon Sep 17 00:00:00 2001
+From 5cbd571d0769356f0a70a57c7f12b79b5eb210e7 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Tue, 18 Apr 2017 17:24:03 +0200
-Subject: [PATCH 11/17] Revert "Contribs: update libpng to 1.6.29"
+Subject: [PATCH 11/19] Revert "Contribs: update libpng to 1.6.29"
 
 This reverts commit 8891af2d84de3caa5c4f2a51acbb2b47647ed62d.
 ---

+ 2 - 2
Resources/MobileVLCKit/patches/0012-contrib-gcrypt-work-around-a-libtool-limitation.patch

@@ -1,7 +1,7 @@
-From a3719acc4f23591d3bb1f9c53a6c896b3fccf7bb Mon Sep 17 00:00:00 2001
+From b5d247eb7afb5f17580ff21ca72296542ddafae7 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Sun, 7 Dec 2014 20:02:18 +0100
-Subject: [PATCH 12/17] contrib/gcrypt: work-around a libtool limitation
+Subject: [PATCH 12/19] contrib/gcrypt: work-around a libtool limitation
 
 ---
  contrib/src/gcrypt/rules.mak                       |  1 +

+ 2 - 2
Resources/MobileVLCKit/patches/0013-contrib-gcrypt-fix-tvOS-compilation.patch

@@ -1,7 +1,7 @@
-From e548617ce509bbf2bc0aeea916da0ba416ee36b7 Mon Sep 17 00:00:00 2001
+From f06d8ac10f1fd1ad39c2b6aa79b67c260e88ae1a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Sat, 3 Oct 2015 22:45:14 +0200
-Subject: [PATCH 13/17] contrib/gcrypt: fix tvOS compilation
+Subject: [PATCH 13/19] contrib/gcrypt: fix tvOS compilation
 
 ---
  contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++

+ 2 - 2
Resources/MobileVLCKit/patches/0014-contrib-gcrypt-update-patches.patch

@@ -1,7 +1,7 @@
-From 46c9853361f1655e192a4df326d603214d14236f Mon Sep 17 00:00:00 2001
+From 642c253bdc0053595342241d967e62dcc4ad49cd Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 12 Sep 2016 17:03:37 +0200
-Subject: [PATCH 14/17] contrib/gcrypt: update patches
+Subject: [PATCH 14/19] contrib/gcrypt: update patches
 
 ---
  contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch  | 308 ++++++++++++++++++++-

+ 2 - 2
Resources/MobileVLCKit/patches/0015-contrib-avcodec-enforce-use-of-FFmpeg.patch

@@ -1,7 +1,7 @@
-From ed34cb9b28496493f15bb3b142d769fd16ff2d35 Mon Sep 17 00:00:00 2001
+From 1e566b864c98f7ce158a56e7e66fadb302b592f0 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 17 Jul 2017 17:05:51 +0200
-Subject: [PATCH 15/17] contrib/avcodec: enforce use of FFmpeg
+Subject: [PATCH 15/19] contrib/avcodec: enforce use of FFmpeg
 
 ---
  contrib/src/ffmpeg/rules.mak | 2 +-

+ 2 - 2
Resources/MobileVLCKit/patches/0016-build-rename-exported-symbols-by-module.patch

@@ -1,7 +1,7 @@
-From 3a2c702d67fed258968aa80f18412dc39eafae31 Mon Sep 17 00:00:00 2001
+From 6d1b289a6a34b16479cb66d81022a6ec46b51fc8 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Tue, 11 Apr 2017 15:15:26 +0200
-Subject: [PATCH 16/17] build: rename exported symbols by module
+Subject: [PATCH 16/19] build: rename exported symbols by module
 
 This is quite ugly and temporary. Ideally we should rename symbols in binaries like the Android script do.
 ---

+ 2 - 2
Resources/MobileVLCKit/patches/0017-Remove-thread-local.patch

@@ -1,7 +1,7 @@
-From 523c9afde12b982425e107f004d26b027fd1a158 Mon Sep 17 00:00:00 2001
+From c394f21609d2698ae636943f5738877ea496cac3 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 17 Jul 2017 17:03:24 +0200
-Subject: [PATCH 17/17] Remove thread local
+Subject: [PATCH 17/19] Remove thread local
 
 ---
  src/misc/interrupt.c | 2 +-

+ 35 - 0
Resources/MobileVLCKit/patches/0018-vout-iOS-don-t-draw-if-the-app-is-not-active.patch

@@ -0,0 +1,35 @@
+From f57d23b3edd828b5cd180bbf1b85e038dca9508d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@serioese.gmbh>
+Date: Wed, 6 Sep 2017 17:38:35 +0200
+Subject: [PATCH 18/19] vout iOS: don't draw if the app is not active
+
+---
+ modules/video_output/ios.m | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
+index a22d281b4d..9e59212a1e 100644
+--- a/modules/video_output/ios.m
++++ b/modules/video_output/ios.m
+@@ -529,7 +529,6 @@ static void OpenglESSwap(vlc_gl_t *gl)
+ 
+ - (void)dealloc
+ {
+-
+     [[NSNotificationCenter defaultCenter] removeObserver:self];
+     [_eaglContext release];
+     [super dealloc];
+@@ -551,6 +550,10 @@ static void OpenglESSwap(vlc_gl_t *gl)
+         return;
+     }
+ 
++    if (unlikely(!_appActive)) {
++        return;
++    }
++
+     glDisable(GL_DEPTH_TEST);
+ 
+     glGenFramebuffers(1, &_frameBuffer);
+-- 
+2.14.1
+

+ 38 - 0
Resources/MobileVLCKit/patches/0019-audio-unit-iOS-add-missing-notification-center-remov.patch

@@ -0,0 +1,38 @@
+From 819c2d8f87e552617bd95ee3f2273c6a92e2491d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@serioese.gmbh>
+Date: Wed, 6 Sep 2017 17:55:25 +0200
+Subject: [PATCH 19/19] audio unit iOS: add missing notification center removal
+
+This fixes a regression introduced in e4c0308
+---
+ modules/audio_output/audiounit_ios.m | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
+index 9ef7e2a281..7a90ed7e77 100644
+--- a/modules/audio_output/audiounit_ios.m
++++ b/modules/audio_output/audiounit_ios.m
+@@ -357,6 +357,8 @@ Stop(audio_output_t *p_aout)
+     struct aout_sys_t   *p_sys = p_aout->sys;
+     OSStatus err;
+ 
++    [[NSNotificationCenter defaultCenter] removeObserver:p_sys->aoutWrapper];
++
+     err = AudioOutputUnitStop(p_sys->au_unit);
+     if (err != noErr)
+         ca_LogWarn("AudioOutputUnitStop failed");
+@@ -440,8 +442,9 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
+         Pause(p_aout, true, 0);
+ 
+     [[NSNotificationCenter defaultCenter] addObserver:p_sys->aoutWrapper
+-           selector:@selector(audioSessionRouteChange:)
+-           name:AVAudioSessionRouteChangeNotification object:nil];
++                                             selector:@selector(audioSessionRouteChange:)
++                                                 name:AVAudioSessionRouteChangeNotification
++                                               object:nil];
+ 
+     free(layout);
+     fmt->channel_type = AUDIO_CHANNEL_TYPE_BITMAP;
+-- 
+2.14.1
+

+ 1 - 1
buildMobileVLCKit.sh

@@ -21,7 +21,7 @@ OSVERSIONMINCFLAG=miphoneos-version-min
 OSVERSIONMINLDFLAG=ios_version_min
 ROOT_DIR=empty
 
-TESTEDHASH=bb538b4e
+TESTEDHASH=7cffecf52
 
 CORE_COUNT=`sysctl -n machdep.cpu.core_count`
 let MAKE_JOBS=$CORE_COUNT+1