totem r5757 - in trunk: . browser-plugin
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5757 - in trunk: . browser-plugin
- Date: Wed, 8 Oct 2008 16:42:28 +0000 (UTC)
Author: hadess
Date: Wed Oct 8 16:42:28 2008
New Revision: 5757
URL: http://svn.gnome.org/viewvc/totem?rev=5757&view=rev
Log:
2008-10-08 Bastien Nocera <hadess hadess net>
* browser-plugin/totemPlugin.cpp:
* browser-plugin/totemPlugin.h: As the requestURI isn't an absolute
URI anymore, it might not have a scheme, in which case, check that
of the baseURI, fixes viewer being called with a playlist, instead
of a media URI when the src is relative (Closes: #555417)
Modified:
trunk/ChangeLog
trunk/browser-plugin/totemPlugin.cpp
trunk/browser-plugin/totemPlugin.h
Modified: trunk/browser-plugin/totemPlugin.cpp
==============================================================================
--- trunk/browser-plugin/totemPlugin.cpp (original)
+++ trunk/browser-plugin/totemPlugin.cpp Wed Oct 8 16:42:28 2008
@@ -959,6 +959,8 @@
void
totemPlugin::RequestStream (bool aForceViewer)
{
+ D ("Stream requested (force viewer: %d)", aForceViewer);
+
// assert (mViewerReady);
if (!mViewerReady)
return;//FIXMEchpe
@@ -1022,7 +1024,7 @@
/* If the URL is supported and the caller isn't asking us to make
* the viewer open the stream, we call OpenStream, and
* otherwise OpenURI. */
- if (!aForceViewer && IsSchemeSupported (requestURI)) {
+ if (!aForceViewer && IsSchemeSupported (requestURI, baseURI)) {
/* This will fail for the 2nd stream, but we shouldn't
* ever come to using it for the 2nd stream... */
@@ -1397,14 +1399,17 @@
}
bool
-totemPlugin::IsSchemeSupported (const char *aURI)
+totemPlugin::IsSchemeSupported (const char *aURI, const char *aBaseURI)
{
if (!aURI)
return false;
char *scheme = g_uri_parse_scheme (aURI);
- if (!scheme)
- return false;
+ if (!scheme) {
+ scheme = g_uri_parse_scheme (aBaseURI);
+ if (!scheme)
+ return false;
+ }
bool isSupported = false;
if (g_ascii_strcasecmp (scheme, "http") == 0 ||
Modified: trunk/browser-plugin/totemPlugin.h
==============================================================================
--- trunk/browser-plugin/totemPlugin.h (original)
+++ trunk/browser-plugin/totemPlugin.h Wed Oct 8 16:42:28 2008
@@ -160,7 +160,7 @@
bool IsMimeTypeSupported (const char *aMimeType,
const char *aURL);
- bool IsSchemeSupported (const char *aURI);
+ bool IsSchemeSupported (const char *aURI, const char *aBaseURI);
void SetRealMimeType (const char *aMimeType);
bool ParseBoolean (const char *key,
const char *value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]