[totem] properties: Fix SIGFPE when framerate isn't available
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] properties: Fix SIGFPE when framerate isn't available
- Date: Wed, 5 Oct 2011 11:57:06 +0000 (UTC)
commit f5c5ba421ffd5539806c43b1009023c2a52c628d
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 5 12:46:49 2011 +0100
properties: Fix SIGFPE when framerate isn't available
https://bugzilla.gnome.org/show_bug.cgi?id=660967
src/totem-properties-view.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/totem-properties-view.c b/src/totem-properties-view.c
index 369866c..56f347b 100644
--- a/src/totem-properties-view.c
+++ b/src/totem-properties-view.c
@@ -175,8 +175,11 @@ update_video (TotemPropertiesView *props,
/* Round up/down to the nearest integer framerate */
fps_n = gst_discoverer_video_info_get_framerate_num (info);
fps_d = gst_discoverer_video_info_get_framerate_denom (info);
- bacon_video_widget_properties_set_framerate (props->priv->props,
- (fps_n + fps_d/2) / fps_d);
+ if (fps_d == 0)
+ bacon_video_widget_properties_set_framerate (props->priv->props, 0);
+ else
+ bacon_video_widget_properties_set_framerate (props->priv->props,
+ (fps_n + fps_d/2) / fps_d);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]