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

Hugo Beauzée-Luyssen git at videolan.org
Tue Jan 24 23:21:54 CET 2012


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

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

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 993077b724bc768345c870f23086bde3c9fc5e9e)

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

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

 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