Commit 5a3cb153 authored by Christopher Mueller's avatar Christopher Mueller Committed by Hugo Beauzée-Luyssen

dash: fixed segfault when period is null

Signed-off-by: default avatarHugo Beauzée-Luyssen <beauze.h@gmail.com>
parent dfd6aafe
......@@ -89,6 +89,9 @@ Period* IsoffMainManager::getFirstPeriod ()
}
Representation* IsoffMainManager::getRepresentation (Period *period, int bitrate) const
{
if(period == NULL)
return NULL;
std::vector<AdaptationSet *> adaptationSets = period->getAdaptationSets();
Representation *best = NULL;
......@@ -128,6 +131,9 @@ const MPD* IsoffMainManager::getMPD () const
}
Representation* IsoffMainManager::getRepresentation (Period *period, int bitrate, int width, int height) const
{
if(period == NULL)
return NULL;
std::vector<AdaptationSet *> adaptationSets = period->getAdaptationSets();
std::cout << "Searching for best representation with bitrate: " << bitrate << " and resolution: " << width << "x" << height << std::endl;
......
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