gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog gui/gnash.cpp plugin/plugin.cpp


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog gui/gnash.cpp plugin/plugin.cpp
Date: Sat, 26 May 2007 11:57:54 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     07/05/26 11:57:53

Modified files:
        .              : ChangeLog 
        gui            : gnash.cpp 
        plugin         : plugin.cpp 

Log message:
                * plugin/plugin.cpp: Initialise _width and _height to safe 
defaults,
                in case SetWindow is never called (for hidden flash movies).
                * gui/gnash.cpp: If the plugin attempts to create a 0x0 pixels 
window
                don't try to create a rendering GUI.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3360&r2=1.3361
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.75&r2=1.76

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3360
retrieving revision 1.3361
diff -u -b -r1.3360 -r1.3361
--- ChangeLog   26 May 2007 10:49:45 -0000      1.3360
+++ ChangeLog   26 May 2007 11:57:52 -0000      1.3361
@@ -1,3 +1,10 @@
+2007-05-26 Bastiaan Jacques <address@hidden>
+
+       * plugin/plugin.cpp: Initialise _width and _height to safe defaults,
+       in case SetWindow is never called (for "hidden" flash movies).
+       * gui/gnash.cpp: If the plugin attempts to create a 0x0 pixels window
+       don't try to create a rendering GUI.
+
 2007-05-26 Ann Barcomb <address@hidden>
 
        * doc/C/usermanual/installation/cross_compiling.xml,

Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- gui/gnash.cpp       18 Apr 2007 09:35:41 -0000      1.69
+++ gui/gnash.cpp       26 May 2007 11:57:53 -0000      1.70
@@ -159,6 +159,7 @@
 {
     bool specified_rendering_flag=false;
     bool called_by_plugin=false;
+    bool width_given=false, height_given=false;
 
     int c = 0;
     // scan for the two main long GNU options
@@ -225,6 +226,7 @@
                break;
          }
           case 'j':
+              width_given = true;
               player.setWidth ( strtol(optarg, NULL, 0) );
               log_msg (_("Setting width to %d"), player.getWidth());
               break;
@@ -239,6 +241,7 @@
 #endif
               break;
           case 'k':
+              height_given = true;
               player.setHeight ( strtol(optarg, NULL, 0) );
               log_msg (_("Setting height to %d"), player.getHeight());
               break;
@@ -319,6 +322,13 @@
         }
     }
 
+    if (called_by_plugin && height_given && width_given && !player.getHeight() 
&& 
+        !player.getWidth()) {
+        // We were given dimensions of 0x0 to render to (probably the plugin
+        // is playing an "invisible" movie. Disable video rendering.
+        player.setDoRender(false);
+    }
+
     // get the file name from the command line
     while (optind < argc) {
 
@@ -363,3 +373,4 @@
 
        return player.run(argc, argv, infile, url);
 }
+

Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- plugin/plugin.cpp   21 Apr 2007 07:05:41 -0000      1.75
+++ plugin/plugin.cpp   26 May 2007 11:57:53 -0000      1.76
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: plugin.cpp,v 1.75 2007/04/21 07:05:41 jgilmore Exp $ */
+/* $Id: plugin.cpp,v 1.76 2007/05/26 11:57:53 bjacques Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -232,6 +232,8 @@
   : nsPluginInstanceBase(),
     _instance(data->instance),
     _window(0),
+    _width(0),
+    _height(0),
     _childpid(0)
 {
        for (size_t i=0, n=data->argc; i<n; ++i) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]