[totem] browser-plugin: Don't handle small SWF in vegas
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] browser-plugin: Don't handle small SWF in vegas
- Date: Mon, 5 Dec 2011 22:23:56 +0000 (UTC)
commit 21a00972a134659eaa48818770193238885a2655
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 5 22:49:48 2011 +0100
browser-plugin: Don't handle small SWF in vegas
browser-plugin/totemPlugin.cpp | 6 ++++++
browser-plugin/totemPlugin.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 47e6d4b..e381add 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -2030,6 +2030,12 @@ totemPlugin::Init (NPMIMEType mimetype,
/* Never try to load the SWF file */
SetSrc ("");
+ /* Is it too small to be a video? */
+ if (width != -1 && width < TOTEM_VEGAS_SMALL_SWF_SIZE) {
+ g_free (oldSrc);
+ oldSrc = NULL;
+ }
+
useURI = NULL;
if (totem_pl_parser_can_parse_from_uri (oldSrc, TRUE))
useURI = oldSrc;
diff --git a/browser-plugin/totemPlugin.h b/browser-plugin/totemPlugin.h
index 485d1f6..cae6d13 100644
--- a/browser-plugin/totemPlugin.h
+++ b/browser-plugin/totemPlugin.h
@@ -40,6 +40,8 @@
#define TOTEM_CONE_VERSION "0.8.6"
#define TOTEM_GMP_VERSION_BUILD "11.0.0.1024"
+#define TOTEM_VEGAS_SMALL_SWF_SIZE 50
+
typedef struct {
const char *mimetype;
const char *extensions;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]