[vlc-commits] dash: Don't use the module when MPD parsing failed.

Hugo Beauzée-Luyssen git at videolan.org
Fri Dec 30 18:15:32 CET 2011


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Dec 25 01:11:52 2011 +0100| [993077b724bc768345c870f23086bde3c9fc5e9e] | committer: Jean-Baptiste Kempf

dash: Don't use the module when MPD parsing failed.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=993077b724bc768345c870f23086bde3c9fc5e9e
---

 modules/stream_filter/dash/dash.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/stream_filter/dash/dash.cpp b/modules/stream_filter/dash/dash.cpp
index 68e4c95..45c1905 100644
--- a/modules/stream_filter/dash/dash.cpp
+++ b/modules/stream_filter/dash/dash.cpp
@@ -101,6 +101,14 @@ static int Open(vlc_object_t *p_obj)
         new dash::DASHManager( p_conManager, p_node,
                               dash::logic::IAdaptationLogic::RateBased );
 
+    if ( p_dashManager->getMpdManager()->getMPD() == NULL )
+    {
+        msg_Err( p_obj, "MPD file parsing failed." );
+        delete p_conManager;
+        delete p_dashManager;
+        free( p_sys );
+        return VLC_EGENERIC;
+    }
     p_sys->p_dashManager    = p_dashManager;
     p_sys->p_node           = p_node;
     p_sys->p_conManager     = p_conManager;



More information about the vlc-commits mailing list