projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ef54ea
)
a little bit more error checking
author
ghost
<andreas.monzner@multimedia-labs.de>
Wed, 10 Nov 2010 19:26:51 +0000
(20:26 +0100)
committer
ghost
<andreas.monzner@multimedia-labs.de>
Wed, 10 Nov 2010 19:26:51 +0000
(20:26 +0100)
lib/dvb/tstools.cpp
patch
|
blob
|
history
diff --git
a/lib/dvb/tstools.cpp
b/lib/dvb/tstools.cpp
index
c7d9a41
..
bd36308
100644
(file)
--- a/
lib/dvb/tstools.cpp
+++ b/
lib/dvb/tstools.cpp
@@
-91,7
+91,7
@@
int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed)
if (!m_streaminfo.getPTS(offset, pts))
return 0;
if (!m_streaminfo.getPTS(offset, pts))
return 0;
- if (!m_source->valid())
+ if (!m_source
|| !m_source
->valid())
return -1;
offset -= offset % 188;
return -1;
offset -= offset % 188;
@@
-411,7
+411,7
@@
int eDVBTSTools::getNextAccessPoint(pts_t &ts, const pts_t &start, int direction
void eDVBTSTools::calcBegin()
{
void eDVBTSTools::calcBegin()
{
- if (!m_source->valid())
+ if (!m_source
|| !m_source
->valid())
return;
if (!(m_begin_valid || m_futile))
return;
if (!(m_begin_valid || m_futile))
@@
-426,7
+426,7
@@
void eDVBTSTools::calcBegin()
void eDVBTSTools::calcEnd()
{
void eDVBTSTools::calcEnd()
{
- if (!m_source->valid())
+ if (!m_source
|| !m_source
->valid())
return;
off_t end = m_source->lseek(0, SEEK_END);
return;
off_t end = m_source->lseek(0, SEEK_END);
@@
-579,7
+579,7
@@
int eDVBTSTools::takeSample(off_t off, pts_t &p)
int eDVBTSTools::findPMT(int &pmt_pid, int &service_id)
{
/* FIXME: this will be factored out soon! */
int eDVBTSTools::findPMT(int &pmt_pid, int &service_id)
{
/* FIXME: this will be factored out soon! */
- if (!m_source->valid())
+ if (!m_source
|| !m_source
->valid())
{
eDebug(" file not valid");
return -1;
{
eDebug(" file not valid");
return -1;