[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10390: Resolve the NetStream play()
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10390: Resolve the NetStream play() URL using the base URL, and do not play unless |
Date: |
Thu, 04 Dec 2008 13:02:58 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10390
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2008-12-04 13:02:58 +0100
message:
Resolve the NetStream play() URL using the base URL, and do not play unless
NetConnection is connected. Should fix a few video SWFs broken since last
night's commit.
modified:
libcore/asobj/NetStream_as.cpp
------------------------------------------------------------
revno: 10387.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-12-04 12:22:53 +0100
message:
Make sure NetStream URLs are constructed with the baseURL, and append to
any NetConnection URL passed with connect().
modified:
libcore/asobj/NetConnection.cpp
libcore/asobj/NetConnection.h
libcore/asobj/NetStream_as.cpp
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp 2008-12-03 21:22:15 +0000
+++ b/libcore/asobj/NetStream_as.cpp 2008-12-04 12:02:58 +0000
@@ -763,15 +763,25 @@
// starts it again, possibly with a new URL.
// Does it have an associated NetConnection ?
- if ( ! _netCon )
+ if ( ! _netCon)
{
IF_VERBOSE_ASCODING_ERRORS(
- log_aserror(_("No NetConnection associated with this NetStream, "
+ log_aserror(_("No NetConnection associated with this NetStream, "
"won't play"));
);
return;
}
+ if (!_netCon->isConnected()) {
+
+ // This can happen when NetConnection is called with anything but
+ // null.
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror(_("NetConnection is not connected. Won't play."));
+ );
+ return;
+ }
+
url = c_url;
// Remove any "mp3:" prefix. Maybe should use this to mark as audio-only
@@ -788,10 +798,12 @@
log_security( _("Connecting to movie: %s"), url );
- const movie_root& mr = _vm.getRoot();
-
- StreamProvider& streamProvider = mr.runInfo().streamProvider();
- _inputStream = streamProvider.getStream(url);
+ const RunInfo& ri = _vm.getRoot().runInfo();
+
+ StreamProvider& streamProvider = ri.streamProvider();
+
+ // Construct URL with base URL.
+ _inputStream = streamProvider.getStream(URL(url, ri.baseURL()));
if ( ! _inputStream.get() )
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10390: Resolve the NetStream play() URL using the base URL, and do not play unless,
Benjamin Wolsey <=