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

dash: Don't crash if we don't have a valid mpdManager.

This will happen when the profil is invalid.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2d31fd77
......@@ -44,6 +44,8 @@ DASHManager::DASHManager ( HTTPConnectionManager *conManager, MPD *mpd,
mpd( mpd )
{
this->mpdManager = mpd::MPDManagerFactory::create( mpd );
if ( this->mpdManager == NULL )
return ;
this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager );
this->conManager->attach(this->adaptationLogic);
}
......
......@@ -109,7 +109,8 @@ static int Open(vlc_object_t *p_obj)
new dash::DASHManager( p_conManager, p_sys->p_mpd,
dash::logic::IAdaptationLogic::RateBased );
if ( p_dashManager->getMpdManager()->getMPD() == NULL )
if ( p_dashManager->getMpdManager() == NULL ||
p_dashManager->getMpdManager()->getMPD() == NULL )
{
delete p_conManager;
delete p_dashManager;
......
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