Ticket #6169: fix_PosMapFromEnc.diff

File fix_PosMapFromEnc.diff, 1.3 KB (added by Shane Shrybman, 11 years ago)
  • libs/libmythtv/decoderbase.cpp

     
    178178    return true;
    179179}
    180180
     181/** \fn DecoderBase::PosMapFromEnc()
     182 *  \brief Queries encoder for position map data
     183 *         that has not been committed to the DB yet.
     184 *
     185 *  PosMapFromDb() must be called first in order to
     186 *  set positionMapType and keyframedist correctly.
     187 *
     188 */
    181189bool DecoderBase::PosMapFromEnc(void)
    182190{
    183191    if (!m_parent)
     
    191199    }
    192200
    193201    QMap<long long, long long> posMap;
    194     if (m_parent->PosMapFromEnc(start, posMap))
     202    if (!m_parent->PosMapFromEnc(start, posMap))
    195203        return false;
    196204
    197205    QMutexLocker locker(&m_positionMapLock);
    198206
    199     // LiveTV will always have a by frame keyframe map..
    200     positionMapType = MARK_GOP_BYFRAME;
    201     keyframedist = 1;
    202 
    203207    // append this new position map to class's
    204208    m_positionMap.reserve(m_positionMap.size() + posMap.size());
    205209    for (QMap<long long,long long>::const_iterator it = posMap.begin();
    206210         it != posMap.end(); it++)
    207211    {
    208         PosMapEntry e = {it.key(), it.key(), *it};
     212        PosMapEntry e = {it.key(), it.key() * keyframedist, *it};
    209213        m_positionMap.push_back(e);
    210214    }
    211215    if (!m_positionMap.empty())