[mythtv] minor fix for decoderbase.cpp
Mark Weaver
mark-clist at npsl.co.uk
Wed Aug 24 01:42:48 UTC 2005
"mythfrontend -v all" tuned to an off-air DVB channel causes SIGSEGV
without this.
-------------- next part --------------
Index: decoderbase.cpp
===================================================================
--- decoderbase.cpp (revision 7110)
+++ decoderbase.cpp (working copy)
@@ -112,10 +112,12 @@
PosMapEntry e = {it.key(), it.key() * keyframedist, it.data()};
m_positionMap.push_back(e);
}
- VERBOSE(VB_PLAYBACK, QString("Position map filled from DB to: %1")
- .arg((long int) m_positionMap[m_positionMap.size()-1].index));
+ if (!m_positionMap.empty())
+ {
+ VERBOSE(VB_PLAYBACK, QString("Position map filled from DB to: %1")
+ .arg((long int) m_positionMap[m_positionMap.size()-1].index));
+ }
-
return true;
}
@@ -180,8 +182,11 @@
PosMapEntry e = {it.key(), it.key() * keyframedist, it.data()};
m_positionMap.push_back(e);
}
- VERBOSE(VB_PLAYBACK, QString("Position map filled from Encoder to: %1")
- .arg((long int) m_positionMap[m_positionMap.size()-1].index));
+ if (!m_positionMap.empty())
+ {
+ VERBOSE(VB_PLAYBACK, QString("Position map filled from Encoder to: %1")
+ .arg((long int) m_positionMap[m_positionMap.size()-1].index));
+ }
return true;
}
More information about the mythtv-dev
mailing list