[vlc-commits] demux: dash: no longer use stream_UrlNew for updates
Francois Cartegnie
git at videolan.org
Wed Jun 10 18:58:03 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 27 20:13:41 2015 +0200| [b5ac100fdf3a9051346672b5147593db90faee76] | committer: Francois Cartegnie
demux: dash: no longer use stream_UrlNew for updates
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5ac100fdf3a9051346672b5147593db90faee76
---
modules/demux/dash/DASHManager.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/modules/demux/dash/DASHManager.cpp b/modules/demux/dash/DASHManager.cpp
index 2d04db9..d85b775 100644
--- a/modules/demux/dash/DASHManager.cpp
+++ b/modules/demux/dash/DASHManager.cpp
@@ -39,6 +39,7 @@
#include "xml/DOMParser.h"
#include "../adaptative/logic/RateBasedAdaptationLogic.h"
#include <vlc_stream.h>
+#include "../adaptative/tools/Retrieve.hpp"
#include <algorithm>
#include <ctime>
@@ -73,9 +74,17 @@ bool DASHManager::updatePlaylist()
url.append("://");
url.append(stream->psz_path);
- stream_t *mpdstream = stream_UrlNew(stream, url.c_str());
+ uint8_t *p_data = NULL;
+ size_t i_data = Retrieve::HTTP(VLC_OBJECT(stream), url, (void**) &p_data);
+ if(!p_data)
+ return false;
+
+ stream_t *mpdstream = stream_MemoryNew(stream, p_data, i_data, false);
if(!mpdstream)
+ {
+ free(p_data);
return false;
+ }
xml::DOMParser parser(mpdstream);
if(!parser.parse())
More information about the vlc-commits
mailing list