Commit 83b82fc3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

dash: Fixing SegmentInfoCommon initialization/deletion.

This prevents a potential crash, and solves a memory leak.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cb1d6223
......@@ -24,11 +24,22 @@
#include "SegmentInfoCommon.h"
#include "Segment.h"
#include "SegmentTimeline.h"
using namespace dash::mpd;
SegmentInfoCommon::SegmentInfoCommon() :
duration( -1 )
duration( -1 ),
initialisationSegment( NULL ),
segmentTimeline( NULL )
{
}
SegmentInfoCommon::~SegmentInfoCommon()
{
delete this->segmentTimeline;
delete this->initialisationSegment;
}
time_t SegmentInfoCommon::getDuration() const
......
......@@ -39,6 +39,7 @@ namespace dash
{
public:
SegmentInfoCommon();
virtual ~SegmentInfoCommon();
time_t getDuration() const;
void setDuration( time_t duration );
int getStartIndex() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment