[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/Player.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/Player.cpp |
Date: |
Fri, 29 Sep 2006 10:35:11 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/29 10:35:11
Modified files:
. : ChangeLog
gui : Player.cpp
Log message:
handle failures in movie loading.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.968&r2=1.969
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.8&r2=1.9
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.968
retrieving revision 1.969
diff -u -b -r1.968 -r1.969
--- ChangeLog 29 Sep 2006 10:25:06 -0000 1.968
+++ ChangeLog 29 Sep 2006 10:35:11 -0000 1.969
@@ -1,5 +1,6 @@
2006-09-29 Sandro Santilli <address@hidden>
+ * gui/Player.cpp: handle failures in movie loading.
* backend/render_handler_cairo.cpp: fixed unused parameter warnings.
* gui/gtk_glue_cairo.cpp: fixed unused parameter warnings.
* server/movie.h: fix set_display_callback signature (was changed
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gui/Player.cpp 28 Sep 2006 14:41:39 -0000 1.8
+++ gui/Player.cpp 29 Sep 2006 10:35:11 -0000 1.9
@@ -235,9 +235,15 @@
md = NULL;
}
+ if ( ! md )
+ {
+ fprintf(stderr, "Could not load movie '%s'\n", infile);
+ return EXIT_FAILURE;
+ }
+
// Get info about the width & height of the movie.
- int movie_width = (int)md->get_width_pixels();
- int movie_height = (int)md->get_height_pixels();
+ int movie_width = static_cast<int>(md->get_width_pixels());
+ int movie_height = static_cast<int>(md->get_height_pixels());
float movie_fps = md->get_frame_rate();
if (!width) {