diff options
-rw-r--r-- | lib/libdvd/libdvdread/src/dvd_reader.c | 2 | ||||
-rw-r--r-- | lib/libdvd/patches/01-libdvdread.diff | 2 | ||||
-rw-r--r-- | tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java.in | 2 | ||||
-rw-r--r-- | xbmc/utils/JobManager.cpp | 23 | ||||
-rw-r--r-- | xbmc/utils/JobManager.h | 5 |
5 files changed, 7 insertions, 27 deletions
diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c index f8df635797..6d3c21e5b3 100644 --- a/lib/libdvd/libdvdread/src/dvd_reader.c +++ b/lib/libdvd/libdvdread/src/dvd_reader.c @@ -1248,7 +1248,7 @@ int DVDCheckSector(unsigned char *data, int offset) { int i = 0; int32_t *p = (int32_t*)data + (DVD_VIDEO_LB_LEN>>2)*offset; - for(;i<(DVD_VIDEO_LB_LEN<<2);i++) { + for(;i<(DVD_VIDEO_LB_LEN>>2);i++) { if(*(p+i) != 0) break; } diff --git a/lib/libdvd/patches/01-libdvdread.diff b/lib/libdvd/patches/01-libdvdread.diff index d31c566053..f388217312 100644 --- a/lib/libdvd/patches/01-libdvdread.diff +++ b/lib/libdvd/patches/01-libdvdread.diff @@ -147,7 +147,7 @@ diff -uwr libdvdread-4.2.1/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r +{ + int i = 0; + int32_t *p = (int32_t*)data + (DVD_VIDEO_LB_LEN>>2)*offset; -+ for(;i<(DVD_VIDEO_LB_LEN<<2);i++) { ++ for(;i<(DVD_VIDEO_LB_LEN>>2);i++) { + if(*(p+i) != 0) + break; + } diff --git a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java.in b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java.in index 963149407f..b1d73c724f 100644 --- a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java.in +++ b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java.in @@ -5,6 +5,7 @@ import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; +import android.graphics.PixelFormat; public class Main extends NativeActivity { @@ -19,6 +20,7 @@ public class Main extends NativeActivity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + getWindow().setFormat(PixelFormat.TRANSPARENT); } @Override diff --git a/xbmc/utils/JobManager.cpp b/xbmc/utils/JobManager.cpp index 46cda78871..d2d2a13f7b 100644 --- a/xbmc/utils/JobManager.cpp +++ b/xbmc/utils/JobManager.cpp @@ -177,7 +177,6 @@ CJobManager::CJobManager() m_jobCounter = 0; m_running = true; m_pauseJobs = false; - m_tangle = 0; } void CJobManager::Restart() @@ -257,13 +256,6 @@ void CJobManager::CancelJob(unsigned int jobID) Processing::iterator it = find(m_processing.begin(), m_processing.end(), jobID); if (it != m_processing.end()) it->m_callback = NULL; // job is in progress, so only thing to do is to remove callback - - // wait for tangled callbacks to finish - while(m_tangle) - { - CLog::Log(LOGDEBUG, "CJobManager::CancelJob - waiting for tangled callbacks"); - m_tangle_cond.wait(m_section); - } } void CJobManager::StartWorkers(CJob::PRIORITY priority) @@ -378,24 +370,18 @@ CJob *CJobManager::GetNextJob(const CJobWorker *worker) return NULL; } -bool CJobManager::OnJobProgress(unsigned int progress, unsigned int total, const CJob *job) +bool CJobManager::OnJobProgress(unsigned int progress, unsigned int total, const CJob *job) const { CSingleLock lock(m_section); - // find the job in the processing queue, and check whether it's cancelled (no callback) Processing::const_iterator i = find(m_processing.begin(), m_processing.end(), job); if (i != m_processing.end()) { CWorkItem item(*i); - + lock.Leave(); // leave section prior to call if (item.m_callback) { - m_tangle++; - lock.Leave(); // leave section prior to call item.m_callback->OnJobProgress(item.m_id, progress, total, job); - lock.Enter(); - m_tangle--; - m_tangle_cond.notifyAll(); return false; } } @@ -411,8 +397,6 @@ void CJobManager::OnJobComplete(bool success, CJob *job) { // tell any listeners we're done with the job, then delete it CWorkItem item(*i); - - m_tangle++; lock.Leave(); try { @@ -424,9 +408,6 @@ void CJobManager::OnJobComplete(bool success, CJob *job) CLog::Log(LOGERROR, "%s error processing job %s", __FUNCTION__, item.m_job->GetType()); } lock.Enter(); - m_tangle--; - m_tangle_cond.notifyAll(); - Processing::iterator j = find(m_processing.begin(), m_processing.end(), job); if (j != m_processing.end()) m_processing.erase(j); diff --git a/xbmc/utils/JobManager.h b/xbmc/utils/JobManager.h index e7c13ac676..1df2287207 100644 --- a/xbmc/utils/JobManager.h +++ b/xbmc/utils/JobManager.h @@ -298,7 +298,7 @@ protected: \return true if the job has been cancelled, else returns false. \sa IJobCallback, CJob */ - bool OnJobProgress(unsigned int progress, unsigned int total, const CJob *job); + bool OnJobProgress(unsigned int progress, unsigned int total, const CJob *job) const; private: // private construction, and no assignements; use the provided singleton methods @@ -330,7 +330,4 @@ private: CCriticalSection m_section; CEvent m_jobEvent; bool m_running; - - XbmcThreads::ConditionVariable m_tangle_cond; - unsigned int m_tangle; /*!< Active callbacks currently running */ }; |