Commit 0a99eaa9 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>
(cherry picked from commit 13002a34e61624fdf1092083625d511e15c41b63)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ae05b43e
...@@ -44,6 +44,8 @@ DASHManager::DASHManager ( HTTPConnectionManager *conManager, MPD *mpd, ...@@ -44,6 +44,8 @@ DASHManager::DASHManager ( HTTPConnectionManager *conManager, MPD *mpd,
mpd( mpd ) mpd( mpd )
{ {
this->mpdManager = mpd::MPDManagerFactory::create( mpd ); this->mpdManager = mpd::MPDManagerFactory::create( mpd );
if ( this->mpdManager == NULL )
return ;
this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager ); this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager );
this->conManager->attach(this->adaptationLogic); this->conManager->attach(this->adaptationLogic);
} }
......
...@@ -109,7 +109,8 @@ static int Open(vlc_object_t *p_obj) ...@@ -109,7 +109,8 @@ static int Open(vlc_object_t *p_obj)
new dash::DASHManager( p_conManager, p_sys->p_mpd, new dash::DASHManager( p_conManager, p_sys->p_mpd,
dash::logic::IAdaptationLogic::RateBased ); 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_conManager;
delete p_dashManager; 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