totem r5128 - in trunk: . src/backend



Author: tpm
Date: Fri Feb 15 12:32:05 2008
New Revision: 5128
URL: http://svn.gnome.org/viewvc/totem?rev=5128&view=rev

Log:
	* src/backend/bacon-video-widget-gst-0.10.c: (get_media_size):
	  Fix "gst_value_set_fraction: assertion `denominator != 0' failed"
	  warning in case we don't have width/height yet (Closes: #516653)



Modified:
   trunk/ChangeLog
   trunk/src/backend/bacon-video-widget-gst-0.10.c

Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c	(original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c	Fri Feb 15 12:32:05 2008
@@ -432,7 +432,11 @@
       
       GST_DEBUG ("movie PAR is %d/%d", movie_par_n, movie_par_d);
 
-      if (!gst_video_calculate_display_ratio (&num, &den,
+      if (bvw->priv->video_width == 0 || bvw->priv->video_height == 0) {
+        GST_DEBUG ("width and/or height 0, assuming 1/1 ratio");
+        num = 1;
+        den = 1;
+      } else if (!gst_video_calculate_display_ratio (&num, &den,
           bvw->priv->video_width, bvw->priv->video_height,
           movie_par_n, movie_par_d, disp_par_n, disp_par_d)) {
         GST_WARNING ("overflow calculating display aspect ratio!");



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