changeset 16289:cafa391ff89c

mode fps int vs. float woes
author henry
date Mon, 22 Aug 2005 20:04:42 +0000
parents 1cb19a114eb8
children 8a2585bc494f
files libmpdemux/tvi_v4l2.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l2.c	Mon Aug 22 09:05:18 2005 +0000
+++ b/libmpdemux/tvi_v4l2.c	Mon Aug 22 20:04:42 2005 +0000
@@ -556,7 +556,7 @@
 	priv->immediate_mode = 1;
 	return TVI_CONTROL_TRUE;
     case TVI_CONTROL_VID_GET_FPS:
-	*(float *)arg = priv->standard.frameperiod.denominator /
+	*(float *)arg = (float)priv->standard.frameperiod.denominator /
 	    priv->standard.frameperiod.numerator;
 	mp_msg(MSGT_TV, MSGL_V, "%s: get fps: %f\n", info.short_name,
 	       *(float *)arg);
@@ -1218,8 +1218,8 @@
 
     /* setup video parameters */
     if (!tv_param_noaudio) {
-	if (priv->video_buffer_size_max < 3.0*(priv->standard.frameperiod.denominator /
-					       priv->standard.frameperiod.numerator)
+	if (priv->video_buffer_size_max < (3*priv->standard.frameperiod.denominator) /
+					       priv->standard.frameperiod.numerator
 	    *priv->audio_secs_per_block) {
 	    mp_msg(MSGT_TV, MSGL_ERR, "Video buffer shorter than 3 times audio frame duration.\n"
 		   "You will probably experience heavy framedrops.\n");