[vlc-commits] dash: Don't crash if we don't have a valid mpdManager.
Hugo Beauzée-Luyssen
git at videolan.org
Tue Jan 24 23:21:59 CET 2012
vlc/vlc-1.2 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Dec 30 19:02:32 2011 +0100| [0a99eaa93e251f79cbfc7bfa6fa676dec4588aae] | 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 <jb at videolan.org>
(cherry picked from commit 13002a34e61624fdf1092083625d511e15c41b63)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=0a99eaa93e251f79cbfc7bfa6fa676dec4588aae
---
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;
More information about the vlc-commits
mailing list