diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-10-05 17:27:27 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-10-05 17:27:27 +0400 |
commit | 3f75f6e950caee591d3c4130f4a42e707a0597c5 (patch) | |
tree | 3b635b700ceb431b84dac5f150244ac864347a70 /src/apps/mplayerc/Ifo.cpp | |
parent | ec8c01ad5f051dae92cd0d3c29cb7aafe320500d (diff) |
Fix : bugs in DVD playback introduced in rev 808
Fix : D3DFS resize when monitor resolution is changed
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@820 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/Ifo.cpp')
-rw-r--r-- | src/apps/mplayerc/Ifo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/apps/mplayerc/Ifo.cpp b/src/apps/mplayerc/Ifo.cpp index 83565cc16..be4e909f6 100644 --- a/src/apps/mplayerc/Ifo.cpp +++ b/src/apps/mplayerc/Ifo.cpp @@ -163,7 +163,7 @@ CIfo::pgc_t* CIfo::GetPGCI(const int title) bool CIfo::IsVTS()
{
- if (m_dwSize>12 && !strncmp ((char*)m_pBuffer, "DVDVIDEO-VTS", 12))
+ if (m_dwSize<12 || (strncmp ((char*)m_pBuffer, "DVDVIDEO-VTS", 12)!=0))
return false;
return true;
@@ -172,7 +172,7 @@ bool CIfo::IsVTS() bool CIfo::IsVMG()
{
- if (m_dwSize>12 && !strncmp ((char*)m_pBuffer, "DVDVIDEO-VMG", 12))
+ if (m_dwSize<12 || (strncmp ((char*)m_pBuffer, "DVDVIDEO-VMG", 12)!=0))
return false;
return true;
@@ -193,10 +193,10 @@ bool CIfo::OpenFile (LPCTSTR strFile) ReadFile (hFile, m_pBuffer, dwSize, &m_dwSize, NULL);
CloseHandle (hFile);
- if (IsVTS())
- m_pPGCI = (ifo_hdr_t*)(m_pBuffer + OFF_VMGM_PGCI_UT(m_pBuffer) * DVD_VIDEO_LB_LEN);
- else if (IsVMG())
+ if (IsVTS() && (OFF_VTSM_PGCI_UT(m_pBuffer)!=0))
m_pPGCI = (ifo_hdr_t*)(m_pBuffer + OFF_VTSM_PGCI_UT(m_pBuffer) * DVD_VIDEO_LB_LEN);
+ else if (IsVMG() && (OFF_VMGM_PGCI_UT(m_pBuffer)!=0))
+ m_pPGCI = (ifo_hdr_t*)(m_pBuffer + OFF_VMGM_PGCI_UT(m_pBuffer) * DVD_VIDEO_LB_LEN);
bRet = (m_pPGCI != NULL);
}
|