aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavilla <davilla@svn>2009-12-21 05:23:14 +0000
committerdavilla <davilla@svn>2009-12-21 05:23:14 +0000
commit009f0a3aeeac27024d1347bcec711560b11bd502 (patch)
tree48959ed4182d22445dfe106559b356e1c76a98ec
parent047c888291c71068f498e39b97dbc42cb6412427 (diff)
fixed, crash if mpls_parse returns null
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25924 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGL.cpp21
-rw-r--r--xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamMPLS.cpp31
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerAudio.cpp2
3 files changed, 36 insertions, 18 deletions
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
index 8e6de5682a..355441797d 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -559,7 +559,12 @@ void CLinuxRendererGL::LoadTextures(int source)
if (deinterlacing)
{
// Load Y fields
- LoadPlane( fields[FIELD_ODD][0] , GL_LUMINANCE, buf.flipindex
+ if (m_pboused)
+ LoadPlane( fields[FIELD_ODD][0] , GL_LUMINANCE, buf.flipindex
+ , im->width, im->height >> 1
+ , im->stride[0]*2, im->plane[0] + 1 );
+ else
+ LoadPlane( fields[FIELD_ODD][0] , GL_LUMINANCE, buf.flipindex
, im->width, im->height >> 1
, im->stride[0]*2, im->plane[0] );
@@ -585,11 +590,21 @@ void CLinuxRendererGL::LoadTextures(int source)
if (deinterlacing)
{
// Load Even U & V Fields
- LoadPlane( fields[FIELD_ODD][1], GL_LUMINANCE, buf.flipindex
+ if (m_pboused)
+ LoadPlane( fields[FIELD_ODD][1], GL_LUMINANCE, buf.flipindex
+ , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+ , im->stride[1]*2, im->plane[1] + 1 );
+ else
+ LoadPlane( fields[FIELD_ODD][1], GL_LUMINANCE, buf.flipindex
, im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
, im->stride[1]*2, im->plane[1] );
- LoadPlane( fields[FIELD_ODD][2], GL_LUMINANCE, buf.flipindex
+ if (m_pboused)
+ LoadPlane( fields[FIELD_ODD][2], GL_LUMINANCE, buf.flipindex
+ , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+ , im->stride[2]*2, im->plane[2] + 1 );
+ else
+ LoadPlane( fields[FIELD_ODD][2], GL_LUMINANCE, buf.flipindex
, im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
, im->stride[2]*2, im->plane[2] );
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamMPLS.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamMPLS.cpp
index f22df25390..9385da864f 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamMPLS.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamMPLS.cpp
@@ -71,22 +71,25 @@ bool CDVDInputStreamMPLS::Open(const char* strFile, const std::string& content)
CStdString strPlaylist = CUtil::AddFileToFolder(strPath,CStdString("PLAYLIST/")+mainTitle);
MPLS_PL* playList = mpls_parse(const_cast<char*>(strPlaylist.c_str()),0);
- vector<CStdString> paths;
-/* TODO: convert mpls offsets to edl */
- for( int i=0;i<playList->list_count;++i)
- {
- CStdString strFile;
- strFile.Format("STREAM/%s.m2ts",playList->play_item[i].clip[0].clip_id);
- paths.push_back(CUtil::AddFileToFolder(strPath,strFile));
- }
- if (paths.size() > 1)
+ if (playList)
{
- CStackDirectory dir;
- dir.ConstructStackPath(paths,strPath);
+ vector<CStdString> paths;
+/* TODO: convert mpls offsets to edl */
+ for( int i=0;i<playList->list_count;++i)
+ {
+ CStdString strFile;
+ strFile.Format("STREAM/%s.m2ts",playList->play_item[i].clip[0].clip_id);
+ paths.push_back(CUtil::AddFileToFolder(strPath,strFile));
+ }
+ if (paths.size() > 1)
+ {
+ CStackDirectory dir;
+ dir.ConstructStackPath(paths,strPath);
+ }
+ else
+ strPath = paths[0];
+ mpls_free(playList);
}
- else
- strPath = paths[0];
- mpls_free(playList);
free(mainTitle);
if (!(m_stream = CDVDFactoryInputStream::CreateInputStream(NULL,strPath,content)))
return false;
diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
index abb4b4b0d2..5ab4840fc7 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp
@@ -141,7 +141,7 @@ CDVDPlayerAudio::CDVDPlayerAudio(CDVDClock* pClock)
m_freq = CurrentHostFrequency();
InitializeCriticalSection(&m_critCodecSection);
- m_messageQueue.SetMaxDataSize(1024 * 1024);
+ m_messageQueue.SetMaxDataSize(1 * 1024 * 1024);
m_messageQueue.SetMaxTimeSize(4.0);
g_dvdPerformanceCounter.EnableAudioQueue(&m_messageQueue);
}