community/xbmc to 13.1-2

This commit is contained in:
WarheadsSE 2014-06-10 13:45:47 -06:00
parent 1e101c58d8
commit 5f2eb652dc
4 changed files with 15 additions and 86 deletions

View file

@ -1,75 +0,0 @@
From a58bcbb0a35ac8e26a880be477705d833330ecc5 Mon Sep 17 00:00:00 2001
From: Jonathan Marshall <jmarshall@xbmc.org>
Date: Tue, 6 May 2014 19:40:17 +1200
Subject: [PATCH 1/7] [rtmp] check m_rtmp for non-NULL - fixes crashes with
missing librtmp
---
.../dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
index b02792a..93fc6f0 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
@@ -104,7 +104,8 @@ CDVDInputStreamRTMP::~CDVDInputStreamRTMP()
m_sStreamPlaying = NULL;
Close();
- m_libRTMP.Free(m_rtmp);
+ if (m_rtmp)
+ m_libRTMP.Free(m_rtmp);
m_rtmp = NULL;
m_bPaused = false;
}
@@ -139,7 +140,7 @@ bool CDVDInputStreamRTMP::Open(const char* strFile, const std::string& content)
m_sStreamPlaying = NULL;
}
- if (!CDVDInputStream::Open(strFile, "video/x-flv"))
+ if (!m_rtmp || !CDVDInputStream::Open(strFile, "video/x-flv"))
return false;
CSingleLock lock(m_RTMPSection);
@@ -181,7 +182,8 @@ void CDVDInputStreamRTMP::Close()
CSingleLock lock(m_RTMPSection);
CDVDInputStream::Close();
- m_libRTMP.Close(m_rtmp);
+ if (m_rtmp)
+ m_libRTMP.Close(m_rtmp);
m_optionvalues.clear();
m_eof = true;
@@ -190,6 +192,9 @@ void CDVDInputStreamRTMP::Close()
int CDVDInputStreamRTMP::Read(uint8_t* buf, int buf_size)
{
+ if (!m_rtmp)
+ return -1;
+
int i = m_libRTMP.Read(m_rtmp, (char *)buf, buf_size);
if (i < 0)
m_eof = true;
@@ -210,7 +215,7 @@ bool CDVDInputStreamRTMP::SeekTime(int iTimeInMsec)
CLog::Log(LOGNOTICE, "RTMP Seek to %i requested", iTimeInMsec);
CSingleLock lock(m_RTMPSection);
- if (m_libRTMP.SendSeek(m_rtmp, iTimeInMsec))
+ if (m_rtmp && m_libRTMP.SendSeek(m_rtmp, iTimeInMsec))
return true;
return false;
@@ -229,7 +234,8 @@ bool CDVDInputStreamRTMP::Pause(double dTime)
CLog::Log(LOGNOTICE, "RTMP Pause %s requested", m_bPaused ? "TRUE" : "FALSE");
- m_libRTMP.Pause(m_rtmp, m_bPaused);
+ if (m_rtmp)
+ m_libRTMP.Pause(m_rtmp, m_bPaused);
return true;
}
--
1.9.1

View file

@ -16,9 +16,9 @@ buildarch=4
_prefix=/usr
pkgname=xbmc
pkgver=13.0
_codename=Gotham_r2
pkgrel=6
pkgver=13.1
_codename=Gotham
pkgrel=2
pkgdesc="A software media player and entertainment hub for digital media"
arch=('i686' 'x86_64')
url="http://xbmc.org"
@ -48,21 +48,18 @@ optdepends=(
'upower: display battery level'
)
install="${pkgname}.install"
source=("xbmc-$pkgver.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
source=("xbmc-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'xbmc.service'
'enable-external-ffmpeg.patch'
'0001-rtmp-check-m_rtmp-for-non-NULL-fixes-crashes-with-mi.patch'
'0001-make-sure-applications-xbmc.desktop-does-nt-have-exe.patch')
sha256sums=('663b99f3e196ead51d90f06ccfa864b4e5ade385dfc5972acb0f854d525f2903'
sha256sums=('344b604eae2ddb47c032dd7964d01f27e6fcd7a8873c84c0841d5da75961a678'
'f83097388e6c9b301cac78de95cf1797d4aaa11e4021734c28d643320e76d919'
'0239e33e87292c7340ed2092f2b5f1e82f5e283b1f763fb125b3aee78f50c355'
'4d643f1bc5a0f9a6bba36c8c2c2d220351acb58172c57d86417b67c02d39fa2b'
'5f5fe2932050265ad71c82b5d23efe5eaf7b2b3a152bdc6da66675cfb655fabe')
prepare() {
cd "$srcdir/xbmc-$pkgver-$_codename"
patch -p1 -i "$srcdir/enable-external-ffmpeg.patch"
patch -p1 -i "$srcdir/0001-rtmp-check-m_rtmp-for-non-NULL-fixes-crashes-with-mi.patch"
patch -p1 -i "$srcdir/0001-make-sure-applications-xbmc.desktop-does-nt-have-exe.patch"
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
@ -109,6 +106,7 @@ build() {
--enable-libusb \
--enable-libcec \
--enable-external-libraries \
--with-lirc-device=/run/lirc/lircd \
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
# Now (finally) build
make

View file

@ -10,10 +10,16 @@ post_install() {
post_upgrade() {
post_install $1
if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
groupmod -g 420 xbmc
groupmod -g 420 xbmc > /dev/null 2>&1
fi
if ! id -u xbmc | grep 420 > /dev/null 2>&1; then
usermod -u 420 xbmc
usermod -u 420 xbmc > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo "Changing uid of user xbmc failed"
echo "It is recommended that the uid is changed."
echo "Stop all processes running under the xbmc user and reinstall xbmc"
echo "or change the uid manually. (usermod -u 420 xbmc)"
fi
chown -R xbmc:xbmc /var/lib/xbmc
fi
}

View file

@ -9,7 +9,7 @@ Group = xbmc
PAMName=login
Type = simple
TTYPath=/dev/tty7
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp vt7
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -- :0 -nolisten tcp vt7
Restart = on-abort
[Install]