[arch-commits] Commit in kodi/trunk (PKGBUILD prevent-taglib-from-crashing-kodi.patch)

Ike Devolder idevolder at archlinux.org
Sat Dec 26 10:12:16 UTC 2015


    Date: Saturday, December 26, 2015 @ 11:12:16
  Author: idevolder
Revision: 154560

upgpkg: kodi 15.2-3

Added:
  kodi/trunk/prevent-taglib-from-crashing-kodi.patch
Modified:
  kodi/trunk/PKGBUILD

-----------------------------------------+
 PKGBUILD                                |    9 ++
 prevent-taglib-from-crashing-kodi.patch |   96 ++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-26 03:54:45 UTC (rev 154559)
+++ PKGBUILD	2015-12-26 10:12:16 UTC (rev 154560)
@@ -13,7 +13,7 @@
 pkgname=('kodi' 'kodi-eventclients')
 pkgver=15.2
 _codename=Isengard
-pkgrel=2
+pkgrel=3
 arch=('i686' 'x86_64')
 url="http://kodi.tv"
 license=('GPL2')
@@ -29,8 +29,10 @@
 )
 source=(
   "$pkgname-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
+  'prevent-taglib-from-crashing-kodi.patch' # can stay in even with new taglib release
 )
-sha256sums=('dd8aeb942e6de5d1488e243e1346cff3f6597e21b5131a3ba72ff5cc82037110')
+sha256sums=('dd8aeb942e6de5d1488e243e1346cff3f6597e21b5131a3ba72ff5cc82037110'
+            'c588153311adbccd7484cc7381f5852b4199301fe04d917279c0a2535891159f')
 
 prepare() {
   cd "$srcdir/xbmc-$pkgver-$_codename"
@@ -39,6 +41,9 @@
   sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
 	sed 's/python/python2/' -i tools/Linux/kodi.sh.in
   sed 's/shell python/shell python2/' -i tools/EventClients/Makefile.in
+
+  # patches
+  patch -p0 -i "$srcdir/prevent-taglib-from-crashing-kodi.patch"
 }
 
 build() {

Added: prevent-taglib-from-crashing-kodi.patch
===================================================================
--- prevent-taglib-from-crashing-kodi.patch	                        (rev 0)
+++ prevent-taglib-from-crashing-kodi.patch	2015-12-26 10:12:16 UTC (rev 154560)
@@ -0,0 +1,96 @@
+--- xbmc/music/tags/TagLoaderTagLib.cpp.orig	2015-12-26 07:34:56.449019063 +0100
++++ xbmc/music/tags/TagLoaderTagLib.cpp	2015-12-26 08:26:13.905598496 +0100
+@@ -134,48 +134,55 @@
+   TagLib::RIFF::WAV::File *  wavFile = NULL;
+   TagLib::RIFF::AIFF::File * aiffFile = NULL;
+ 
+-  if (strExtension == "ape")
+-    file = apeFile = new APE::File(stream);
+-  else if (strExtension == "asf" || strExtension == "wmv" || strExtension == "wma")
+-    file = asfFile = new ASF::File(stream);
+-  else if (strExtension == "flac")
+-    file = flacFile = new FLAC::File(stream, ID3v2::FrameFactory::instance());
+-  else if (strExtension == "it")
+-    file = itFile = new IT::File(stream);
+-  else if (strExtension == "mod" || strExtension == "module" || strExtension == "nst" || strExtension == "wow")
+-    file = modFile = new Mod::File(stream);
+-  else if (strExtension == "mp4" || strExtension == "m4a" || 
+-           strExtension == "m4r" || strExtension == "m4b" || 
+-           strExtension == "m4p" || strExtension == "3g2")
+-    file = mp4File = new MP4::File(stream);
+-  else if (strExtension == "mpc")
+-    file = mpcFile = new MPC::File(stream);
+-  else if (strExtension == "mp3" || strExtension == "aac")
+-    file = mpegFile = new MPEG::File(stream, ID3v2::FrameFactory::instance());
+-  else if (strExtension == "s3m")
+-    file = s3mFile = new S3M::File(stream);
+-  else if (strExtension == "tta")
+-    file = ttaFile = new TrueAudio::File(stream, ID3v2::FrameFactory::instance());
+-  else if (strExtension == "wv")
+-    file = wvFile = new WavPack::File(stream);
+-  else if (strExtension == "aif" || strExtension == "aiff")
+-    file = aiffFile = new RIFF::AIFF::File(stream);
+-  else if (strExtension == "wav")
+-    file = wavFile = new RIFF::WAV::File(stream);
+-  else if (strExtension == "xm")
+-    file = xmFile = new XM::File(stream);
+-  else if (strExtension == "ogg")
+-    file = oggVorbisFile = new Ogg::Vorbis::File(stream);
+-  else if (strExtension == "oga") // Leave this madness until last - oga container can have Vorbis or FLAC
++  try
+   {
+-    file = oggFlacFile = new Ogg::FLAC::File(stream);
+-    if (!file || !file->isValid())
+-    {
+-      delete file;
+-      oggFlacFile = NULL;
++    if (strExtension == "ape")
++      file = apeFile = new APE::File(stream);
++    else if (strExtension == "asf" || strExtension == "wmv" || strExtension == "wma")
++      file = asfFile = new ASF::File(stream);
++    else if (strExtension == "flac")
++      file = flacFile = new FLAC::File(stream, ID3v2::FrameFactory::instance());
++    else if (strExtension == "it")
++      file = itFile = new IT::File(stream);
++    else if (strExtension == "mod" || strExtension == "module" || strExtension == "nst" || strExtension == "wow")
++      file = modFile = new Mod::File(stream);
++    else if (strExtension == "mp4" || strExtension == "m4a" || 
++             strExtension == "m4r" || strExtension == "m4b" || 
++             strExtension == "m4p" || strExtension == "3g2")
++      file = mp4File = new MP4::File(stream);
++    else if (strExtension == "mpc")
++      file = mpcFile = new MPC::File(stream);
++    else if (strExtension == "mp3" || strExtension == "aac")
++      file = mpegFile = new MPEG::File(stream, ID3v2::FrameFactory::instance());
++    else if (strExtension == "s3m")
++      file = s3mFile = new S3M::File(stream);
++    else if (strExtension == "tta")
++      file = ttaFile = new TrueAudio::File(stream, ID3v2::FrameFactory::instance());
++    else if (strExtension == "wv")
++      file = wvFile = new WavPack::File(stream);
++    else if (strExtension == "aif" || strExtension == "aiff")
++      file = aiffFile = new RIFF::AIFF::File(stream);
++    else if (strExtension == "wav")
++      file = wavFile = new RIFF::WAV::File(stream);
++    else if (strExtension == "xm")
++      file = xmFile = new XM::File(stream);
++    else if (strExtension == "ogg")
+       file = oggVorbisFile = new Ogg::Vorbis::File(stream);
++    else if (strExtension == "oga") // Leave this madness until last - oga container can have Vorbis or FLAC
++    {
++      file = oggFlacFile = new Ogg::FLAC::File(stream);
++      if (!file || !file->isValid())
++      {
++        delete file;
++        oggFlacFile = NULL;
++        file = oggVorbisFile = new Ogg::Vorbis::File(stream);
++      }
+     }
+   }
++  catch (const std::exception& ex)
++  {
++    CLog::Log(LOGERROR, "Taglib exception: %s", ex.what());
++  }
+ 
+   if (!file || !file->isOpen())
+   {



More information about the arch-commits mailing list