diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/backend/video-utils.c | 4 | ||||
-rw-r--r-- | src/video-utils.c | 4 |
3 files changed, 9 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2004-10-14 Bastien Nocera <hadess@hadess.net> + * src/video-utils.c: (totem_ratio_fits_screen): no warnings when + height or width == 0 (Closes: #155376) + +2004-10-14 Bastien Nocera <hadess@hadess.net> + * src/totem-disc.c: (totem_disc_resolve_link), (get_device): * src/totem-disc.h: remove uses of gint and gchar, follow relative symlinks when checking for the real device name diff --git a/src/backend/video-utils.c b/src/backend/video-utils.c index c73fb2d12..a1792916c 100644 --- a/src/backend/video-utils.c +++ b/src/backend/video-utils.c @@ -402,8 +402,8 @@ totem_ratio_fits_screen (GdkWindow *video_window, int video_width, GdkRectangle fullscreen_rect; int new_w, new_h; - g_return_val_if_fail (video_width > 0, FALSE); - g_return_val_if_fail (video_height > 0, FALSE); + if (video_width <= 0 || video_height <= 0) + return TRUE; new_w = video_width * ratio; new_h = video_height * ratio; diff --git a/src/video-utils.c b/src/video-utils.c index c73fb2d12..a1792916c 100644 --- a/src/video-utils.c +++ b/src/video-utils.c @@ -402,8 +402,8 @@ totem_ratio_fits_screen (GdkWindow *video_window, int video_width, GdkRectangle fullscreen_rect; int new_w, new_h; - g_return_val_if_fail (video_width > 0, FALSE); - g_return_val_if_fail (video_height > 0, FALSE); + if (video_width <= 0 || video_height <= 0) + return TRUE; new_w = video_width * ratio; new_h = video_height * ratio; |