Ticket #1456: pespacket-underflow-fix.patch

File pespacket-underflow-fix.patch, 516 bytes (added by Janne <janne-mythtv@…>, 15 years ago)
  • libs/libmythtv/mpeg/pespacket.h

     
    5959          _pesdataSize(0), _allocSize(0)
    6060    {
    6161        _badPacket = !VerifyCRC();
    62         _pesdataSize = max(Length()-1 + (HasCRC() ? 4 : 0), (uint)0);
     62        _pesdataSize = Length() + (HasCRC() ? 4 : 0);
     63        if (_pesdataSize > 0)
     64            _pesdataSize -= 1;
    6365    }
    6466
    6567  private: