From 6a73a0243561f507fe796d3479ec7937ea2539d2 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Fri, 21 Mar 2014 13:03:29 -0600 Subject: Merge pull request #4362 from popcornmix/avoid_pictures [players] Skip picture attachments in video players --- xbmc/cores/dvdplayer/DVDPlayer.cpp | 3 ++- xbmc/cores/omxplayer/OMXPlayer.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index b056c8bc31..2a991accba 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -3012,7 +3012,8 @@ bool CDVDPlayer::OpenVideoStream(int iStream, int source, bool reset) if(m_CurrentVideo.id < 0 || m_CurrentVideo.hint != hint) { - if (!m_dvdPlayerVideo.OpenStream(hint)) + // discard if it's a picture attachment (e.g. album art embedded in MP3 or AAC) + if ((pStream->flags & AV_DISPOSITION_ATTACHED_PIC) || !m_dvdPlayerVideo.OpenStream(hint)) { /* mark stream as disabled, to disallaw further attempts */ CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream); diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp index 8705128591..3c4522ee0d 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -3291,7 +3291,8 @@ bool COMXPlayer::OpenVideoStream(int iStream, int source, bool reset) if(m_CurrentVideo.id < 0 || m_CurrentVideo.hint != hint) { - if (!m_omxPlayerVideo.OpenStream(hint)) + // discard if it's a picture attachment (e.g. album art embedded in MP3 or AAC) + if ((pStream->flags & AV_DISPOSITION_ATTACHED_PIC) || !m_omxPlayerVideo.OpenStream(hint)) { /* mark stream as disabled, to disallaw further attempts */ CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream); -- cgit v1.2.3