vlc | branch: master | Hugo Beauzée-Luyssen <beauz...@gmail.com> | Fri Dec 30 19:02:32 2011 +0100| [13002a34e61624fdf1092083625d511e15c41b63] | committer: 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: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13002a34e61624fdf1092083625d511e15c41b63 --- modules/stream_filter/dash/DASHManager.cpp | 2 ++ modules/stream_filter/dash/dash.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/modules/stream_filter/dash/DASHManager.cpp b/modules/stream_filter/dash/DASHManager.cpp index 08205cb..caab9cd 100644 --- a/modules/stream_filter/dash/DASHManager.cpp +++ b/modules/stream_filter/dash/DASHManager.cpp @@ -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); } diff --git a/modules/stream_filter/dash/dash.cpp b/modules/stream_filter/dash/dash.cpp index d99fc4f..4f00dfb 100644 --- a/modules/stream_filter/dash/dash.cpp +++ b/modules/stream_filter/dash/dash.cpp @@ -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; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits