Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

wrap GetStreamDetails in try/catch

  • Loading branch information...
commit 94372afd6cc4b3a840d4e2efbbfd22a2dd9f130e 1 parent 2620d2a
Jonathan Marshall authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 xbmc/video/VideoDatabase.cpp
View
12 xbmc/video/VideoDatabase.cpp
@@ -3075,12 +3075,15 @@ bool CVideoDatabase::GetStreamDetails(CVideoInfoTag& tag) const
bool retVal = false;
+ CStreamDetails& details = tag.m_streamDetails;
+ details.Reset();
+
auto_ptr<Dataset> pDS(m_pDB->CreateDataset());
+ try
+ {
CStdString strSQL = PrepareSQL("SELECT * FROM streamdetails WHERE idFile = %i", tag.m_iFileId);
pDS->query(strSQL);
- CStreamDetails& details = tag.m_streamDetails;
- details.Reset();
while (!pDS->eof())
{
CStreamDetail::StreamType e = (CStreamDetail::StreamType)pDS->fv(1).get_asInt();
@@ -3125,6 +3128,11 @@ bool CVideoDatabase::GetStreamDetails(CVideoInfoTag& tag) const
}
pDS->close();
+ }
+ catch (...)
+ {
+ CLog::Log(LOGERROR, "%s(%i) failed", __FUNCTION__, tag.m_iFileId);
+ }
details.DetermineBestStreams();
if (details.GetVideoDuration() > 0)
Please sign in to comment.
Something went wrong with that request. Please try again.