summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-02-03 13:27:36 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-02-03 13:27:36 +0100
commit2564e76e87ef864fee488f828562b05b25f43e42 (patch)
tree563f061c6adb14d8858260846b247cbea685f42b
parentec00d026536654ab362afeb6e59f5ca6eed96e2c (diff)
fix audio playing of mp3 with embedded artwork
-rw-r--r--package/xbmc/Makefile2
-rw-r--r--package/xbmc/patches/patch-xbmc_cores_dvdplayer_DVDPlayer_cpp17
-rw-r--r--package/xbmc/patches/patch-xbmc_cores_omxplayer_OMXPlayer_cpp18
3 files changed, 36 insertions, 1 deletions
diff --git a/package/xbmc/Makefile b/package/xbmc/Makefile
index c368c4657..a4dd831c7 100644
--- a/package/xbmc/Makefile
+++ b/package/xbmc/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= xbmc
PKG_VERSION:= 12.3
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= 7ae385ebf8e5cfcb917393235e6efbdb
PKG_DESCR:= software media player
PKG_SECTION:= multimedia
diff --git a/package/xbmc/patches/patch-xbmc_cores_dvdplayer_DVDPlayer_cpp b/package/xbmc/patches/patch-xbmc_cores_dvdplayer_DVDPlayer_cpp
new file mode 100644
index 000000000..a8f2af5d8
--- /dev/null
+++ b/package/xbmc/patches/patch-xbmc_cores_dvdplayer_DVDPlayer_cpp
@@ -0,0 +1,17 @@
+--- xbmc-12.3-Frodo.orig/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-12-12 22:47:49.000000000 +0100
++++ xbmc-12.3-Frodo/xbmc/cores/dvdplayer/DVDPlayer.cpp 2014-01-31 17:45:02.259066528 +0100
+@@ -2897,6 +2897,14 @@ bool CDVDPlayer::OpenVideoStream(int iSt
+ if(m_CurrentVideo.id < 0
+ || m_CurrentVideo.hint != hint)
+ {
++ // For audio files, don't open (M)JPEG artwork as video
++ if (m_pInputStream->GetContent().substr(0, 6) == "audio/" && hint.codec == AV_CODEC_ID_MJPEG || hint.codec == AV_CODEC_ID_MJPEGB || hint.codec == AV_CODEC_ID_PNG)
++ {
++ CLog::Log(LOGINFO, "%s - Ignoring video (art) in audio file %s", __FUNCTION__, m_filename.c_str());
++ pStream->disabled = true;
++ pStream->SetDiscard(AVDISCARD_ALL);
++ return false;
++ }
+ if (!m_dvdPlayerVideo.OpenStream(hint))
+ {
+ /* mark stream as disabled, to disallaw further attempts */
diff --git a/package/xbmc/patches/patch-xbmc_cores_omxplayer_OMXPlayer_cpp b/package/xbmc/patches/patch-xbmc_cores_omxplayer_OMXPlayer_cpp
new file mode 100644
index 000000000..c519df088
--- /dev/null
+++ b/package/xbmc/patches/patch-xbmc_cores_omxplayer_OMXPlayer_cpp
@@ -0,0 +1,18 @@
+--- xbmc-12.3-Frodo.orig/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-12-12 22:47:49.000000000 +0100
++++ xbmc-12.3-Frodo/xbmc/cores/omxplayer/OMXPlayer.cpp 2014-01-31 18:05:09.353171156 +0100
+@@ -3007,7 +3007,14 @@ bool COMXPlayer::OpenVideoStream(int iSt
+ if(m_CurrentVideo.id < 0
+ || m_CurrentVideo.hint != hint)
+ {
+- if (!m_player_video.OpenStream(hint))
++ // for music file, don't open artwork as video
++ bool disabled = false;
++ if (m_pInputStream->GetContent().substr(0, 6) == "audio/" && hint.codec == AV_CODEC_ID_MJPEG || hint.codec == AV_CODEC_ID_MJPEGB || hint.codec == AV_CODEC_ID_PNG)
++ {
++ CLog::Log(LOGINFO, "%s - Ignoring video in audio filetype:%s", __FUNCTION__, m_filename.c_str());
++ disabled = true;
++ }
++ if (disabled || !m_player_video.OpenStream(hint))
+ {
+ /* mark stream as disabled, to disallaw further attempts */
+ CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream);