Ticket #4918: libs_libmythtv_mpeg_tspacket.h-init-_tspayload.patch

File libs_libmythtv_mpeg_tspacket.h-init-_tspayload.patch, 650 bytes (added by Erik Hovland <erik@…>, 12 years ago)

init tspayload in ctor (so it does not have uninitialized values)

  • libs/libmythtv/mpeg/tspacket.h

    Initialize _tspayload in ctor
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/mpeg/tspacket.h |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmythtv/mpeg/tspacket.h b/libs/libmythtv/mpeg/tspacket.h
    index 3e87609..ca086f8 100644
    a b class TSPacket : public TSHeader 
    115115{
    116116    friend class PESPacket;
    117117  public:
    118     TSPacket() : TSHeader() {}
     118    TSPacket() : TSHeader() { memset(_tspayload, 0, sizeof(char) * 184); }
    119119    static TSPacket* CreatePayloadOnlyPacket()
    120120    {
    121121        TSPacket *pkt = new TSPacket();