[MPlayer-cvslog] r32438 - in trunk: command.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it.h help/help_mp-nl.h help/h...

reimar subversion at mplayerhq.hu
Mon Oct 4 08:40:33 CEST 2010


Author: reimar
Date: Mon Oct  4 08:40:32 2010
New Revision: 32438

Log:
1000l, %lf is not valid format string for printf (only for scanf) and actually
breaks on Windows. Fix all occurences.
Fixes bug 1810.

Modified:
   trunk/command.c
   trunk/libmpcodecs/ad_liba52.c
   trunk/libmpdemux/demux_mpg.c
   trunk/libmpdemux/muxer_mpeg.c
   trunk/libvo/font_load_ft.c
   trunk/loader/win32.c
   trunk/mplayer.c
   trunk/stream/tvi_v4l.c
   trunk/stream/tvi_v4l2.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-bg.h
   trunk/help/help_mp-cs.h
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h
   trunk/help/help_mp-es.h
   trunk/help/help_mp-fr.h
   trunk/help/help_mp-hu.h
   trunk/help/help_mp-it.h
   trunk/help/help_mp-nl.h
   trunk/help/help_mp-pl.h
   trunk/help/help_mp-ru.h
   trunk/help/help_mp-sv.h
   trunk/help/help_mp-tr.h
   trunk/help/help_mp-zh_CN.h
   trunk/help/help_mp-zh_TW.h

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/command.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -93,7 +93,7 @@ static void rescale_input_coordinates(in
     *dy = (double) iy / (double) vo_dheight;
 
     mp_msg(MSGT_CPLAYER, MSGL_V,
-           "\r\nrescaled coordinates: %.3lf, %.3lf, screen (%d x %d), vodisplay: (%d, %d), fullscreen: %d\r\n",
+           "\r\nrescaled coordinates: %.3f, %.3f, screen (%d x %d), vodisplay: (%d, %d), fullscreen: %d\r\n",
            *dx, *dy, vo_screenwidth, vo_screenheight, vo_dwidth,
            vo_dheight, vo_fs);
 }
@@ -3108,7 +3108,7 @@ int run_command(MPContext *mpctx, mp_cmd
             break;
 
         case MP_CMD_GET_TIME_LENGTH:{
-                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_LENGTH=%.2lf\n",
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_LENGTH=%.2f\n",
                        demuxer_get_time_length(mpctx->demuxer));
             }
             break;

Modified: trunk/libmpcodecs/ad_liba52.c
==============================================================================
--- trunk/libmpcodecs/ad_liba52.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/libmpcodecs/ad_liba52.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -135,7 +135,7 @@ int channels=0;
 
 static sample_t dynrng_call (sample_t c, void *data)
 {
-//	fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
+//	fprintf(stderr, "(%f, %f): %f\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
 	return pow((double)c, drc_level);
 }
 

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/libmpdemux/demux_mpg.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -1015,7 +1015,7 @@ static int demux_mpg_control(demuxer_t *
     switch(cmd) {
 	case DEMUXER_CTRL_GET_TIME_LENGTH:
             if(stream_control(demuxer->stream, STREAM_CTRL_GET_TIME_LENGTH, arg) != STREAM_UNSUPPORTED) {
-              mp_msg(MSGT_DEMUXER,MSGL_DBG2,"\r\nDEMUX_MPG_CTRL, (%.3lf)\r\n", *((double*)arg));
+              mp_msg(MSGT_DEMUXER,MSGL_DBG2,"\r\nDEMUX_MPG_CTRL, (%.3f)\r\n", *((double*)arg));
               return DEMUXER_CTRL_GUESS;
             }
             if (mpg_d && mpg_d->has_valid_timestamps) {

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/libmpdemux/muxer_mpeg.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -1222,9 +1222,9 @@ static int fill_packet(muxer_t *muxer, m
 	if(spriv->dts || spriv->pts)
 	{
 		if((spriv->dts && priv->scr >= spriv->dts) || priv->scr >= spriv->pts)
-			mp_msg(MSGT_MUXER, MSGL_ERR, "\r\nERROR: scr %.3lf, dts %.3lf, pts %.3lf\r\n", (double) priv->scr/27000000.0, (double) spriv->dts/27000000.0, (double) spriv->pts/27000000.0);
+			mp_msg(MSGT_MUXER, MSGL_ERR, "\r\nERROR: scr %.3f, dts %.3f, pts %.3f\r\n", (double) priv->scr/27000000.0, (double) spriv->dts/27000000.0, (double) spriv->pts/27000000.0);
 		else if(priv->scr + 63000*300 < spriv->dts)
-			mp_msg(MSGT_MUXER, MSGL_INFO, "\r\nWARNING>: scr %.3lf, dts %.3lf, pts %.3lf, diff %.3lf, piff %.3lf\r\n", (double) priv->scr/27000000.0, (double) spriv->dts/27000000.0, (double) spriv->pts/27000000.0, (double)(spriv->dts - priv->scr)/27000000.0, (double)(spriv->pts - priv->scr)/27000000.0);
+			mp_msg(MSGT_MUXER, MSGL_INFO, "\r\nWARNING>: scr %.3f, dts %.3f, pts %.3f, diff %.3f, piff %.3f\r\n", (double) priv->scr/27000000.0, (double) spriv->dts/27000000.0, (double) spriv->pts/27000000.0, (double)(spriv->dts - priv->scr)/27000000.0, (double)(spriv->pts - priv->scr)/27000000.0);
 	}
 
 	n = 0;
@@ -1419,7 +1419,7 @@ static void update_scr(muxer_t *muxer)
 			mindts = spriv->framebuf[0].dts;
 	}
 
-	mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %"PRIu64" (%.3lf)\n", priv->scr, (double) (priv->scr/27000000.0));
+	mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %"PRIu64" (%.3f)\n", priv->scr, (double) (priv->scr/27000000.0));
 
 	for(i = 0; i < muxer->avih.dwStreams; i++)
 	{
@@ -1467,9 +1467,9 @@ static int calc_frames_to_flush(muxer_he
 		mp_msg(MSGT_MUXER, MSGL_DBG2, "\n");
 		while(n < vpriv->framebuf_used)
 		{
-			mp_msg(MSGT_MUXER, MSGL_DBG2, "CALC_FRAMES, n=%d, type=%c, pts=%.3lf\n", n, FTYPE(vpriv->framebuf[n].type), (double)vpriv->framebuf[n].pts/27000000.0f);
+			mp_msg(MSGT_MUXER, MSGL_DBG2, "CALC_FRAMES, n=%d, type=%c, pts=%.3f\n", n, FTYPE(vpriv->framebuf[n].type), (double)vpriv->framebuf[n].pts/27000000.0f);
 			if(n+1 < vpriv->framebuf_used)
-				mp_msg(MSGT_MUXER, MSGL_DBG2, "n+1=%d, type=%c, pts=%.3lf\n", n+1, FTYPE(vpriv->framebuf[n+1].type), (double)vpriv->framebuf[n+1].pts/27000000.0f);
+				mp_msg(MSGT_MUXER, MSGL_DBG2, "n+1=%d, type=%c, pts=%.3f\n", n+1, FTYPE(vpriv->framebuf[n+1].type), (double)vpriv->framebuf[n+1].pts/27000000.0f);
 
 			if(vpriv->framebuf[n].type == I_FRAME)
 			{
@@ -1567,7 +1567,7 @@ static int flush_buffers(muxer_t *muxer,
 				apriv->framebuf[i].dts += init_delay;
 			}
 			apriv->last_pts += init_delay;
-			mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nINITIAL VIDEO DELAY: %.3lf, currAPTS: %.3lf\r\n", (double) init_delay/27000000.0f, (double) apriv->last_pts/27000000.0f);
+			mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nINITIAL VIDEO DELAY: %.3f, currAPTS: %.3f\r\n", (double) init_delay/27000000.0f, (double) apriv->last_pts/27000000.0f);
 		}
 
 		if((priv->is_xvcd || priv->is_xsvcd) && (vpriv->size == 0))
@@ -1684,7 +1684,7 @@ static size_t parse_mpeg12_video(muxer_s
 					//the 2 lines below are needed to handle non-standard frame rates (such as 18)
 					if(! spriv->delta_pts)
 						spriv->delta_pts = spriv->nom_delta_pts = (uint64_t) ((double)27000000.0 * spriv->delta_clock );
-					mp_msg(MSGT_MUXER, MSGL_DBG2, "\nFPS: %.3f, FRAMETIME: %.3lf\n", fps, (double)1/fps);
+					mp_msg(MSGT_MUXER, MSGL_DBG2, "\nFPS: %.3f, FRAMETIME: %.3f\n", fps, (double)1/fps);
 					if(priv->patch_seq)
 						patch_seq(priv, &(s->buffer[i]));
 				}
@@ -1782,7 +1782,7 @@ static size_t parse_mpeg12_video(muxer_s
 		mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG12: add_frames(%zd) failed, exit\r\n", len);
 		return 0;
 	}
-	mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nVIDEO FRAME, PT: %C, tr: %d, diff: %d, dts: %.3lf, pts: %.3lf, pdt: %u, gop_reset: %d\r\n",
+	mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nVIDEO FRAME, PT: %C, tr: %d, diff: %d, dts: %.3f, pts: %.3f, pdt: %u, gop_reset: %d\r\n",
 		ftypes[pt], temp_ref, frames_diff, ((double) spriv->last_dts/27000000.0f),
 		((double) spriv->last_pts/27000000.0f), spriv->picture.display_time, gop_reset);
 
@@ -1803,7 +1803,7 @@ static size_t parse_mpeg12_video(muxer_s
 					adj++;
 				}
 			}
-			mp_msg(MSGT_MUXER, MSGL_V, "\r\nResynced B-frame by %d units, DIFF: %"PRId64" (%.3lf),[pd]ts=%.3lf\r\n",
+			mp_msg(MSGT_MUXER, MSGL_V, "\r\nResynced B-frame by %d units, DIFF: %"PRId64" (%.3f),[pd]ts=%.3f\r\n",
 				n, diff, (double) diff/27000000.0f, (double) spriv->last_pts/27000000.0f);
 			spriv->last_pts = spriv->last_dts;
 		}
@@ -1848,7 +1848,7 @@ static uint64_t fix_mp4_frame_duration(m
 		{
 			vpriv->framebuf[i].pts += diff;
 			vpriv->framebuf[i].dts += i * diff;
-			mp_msg(MSGT_MUXER, MSGL_DBG2, "FIXED_PTS: %.3lf, FIXED_DTS: %.3lf\n",
+			mp_msg(MSGT_MUXER, MSGL_DBG2, "FIXED_PTS: %.3f, FIXED_DTS: %.3f\n",
 				(double) (vpriv->framebuf[i].pts/27000000.0), (double) (vpriv->framebuf[i].dts/27000000.0));
 		}
 		return diff;
@@ -1904,7 +1904,7 @@ static size_t parse_mpeg4_video(muxer_st
 			//warning, it seems that packed bops can lead to delta == 0
 
 			pt = vpriv->picture.picture_type + 1;
-			mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %"PRId64" = %.3lf, delta2: %.3lf\n",
+			mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %"PRId64" = %.3f, delta2: %.3f\n",
 				FTYPE(pt), vpriv->picture.timeinc_resolution, vpriv->picture.timeinc_unit, delta, delta_pts, (double) (delta_pts/27000000.0),
 				(double) delta / (double) vpriv->picture.timeinc_resolution);
 
@@ -1937,13 +1937,13 @@ static size_t parse_mpeg4_video(muxer_st
 			vpriv->last_pts += vpriv->frame_duration;
 			vpriv->last_dts = vpriv->framebuf[vpriv->framebuf_used-1].dts;
 			vpriv->delta_clock = ((double) vpriv->frame_duration)/27000000.0;
-			mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %"PRIu64"   %.3lf\n",
+			mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %"PRIu64"   %.3f\n",
 				vpriv->frame_duration, (double) (vpriv->frame_duration/27000000.0));
 			vpriv->is_ready = 1;
 		}
 	}
 
-	mp_msg(MSGT_MUXER, MSGL_DBG2, "LAST_PTS: %.3lf, LAST_DTS: %.3lf\n",
+	mp_msg(MSGT_MUXER, MSGL_DBG2, "LAST_PTS: %.3f, LAST_DTS: %.3f\n",
 		(double) (vpriv->last_pts/27000000.0), (double) (vpriv->last_dts/27000000.0));
 
 	vpriv->vframes++;
@@ -2303,7 +2303,7 @@ static void mpegfile_write_chunk(muxer_s
 		if(! spriv->vframes)
 		{
 			spriv->last_dts = spriv->last_pts - (uint64_t)(27000000.0f/fps);
-			mp_msg(MSGT_MUXER, MSGL_INFO,"INITV: %.3lf, %.3lf, fps: %.3f\r\n", (double) spriv->last_pts/27000000.0f, (double) spriv->last_dts/27000000.0f, fps);
+			mp_msg(MSGT_MUXER, MSGL_INFO,"INITV: %.3f, %.3f, fps: %.3f\r\n", (double) spriv->last_pts/27000000.0f, (double) spriv->last_dts/27000000.0f, fps);
 		}
 
 		if(is_mpeg1(stream_format) || is_mpeg2(stream_format))
@@ -2377,7 +2377,7 @@ static void mpegfile_write_chunk(muxer_s
 			parse_audio(s, 0, &nf, &fake_timer, priv->init_adelay, priv->drop);
 			spriv->vframes += nf;
 			if(! spriv->vframes)
-				mp_msg(MSGT_MUXER, MSGL_INFO, "AINIT: %.3lf\r\n", (double) spriv->last_pts/27000000.0f);
+				mp_msg(MSGT_MUXER, MSGL_INFO, "AINIT: %.3f\r\n", (double) spriv->last_pts/27000000.0f);
 		}
 	}
 
@@ -2406,7 +2406,7 @@ static void mpegfile_write_index(muxer_t
 		write_mpeg_pack(muxer, NULL, muxer->stream, 1);	//insert fake Nav Packet
 	}
 
-	mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3lf%% (%"PRIu64" / %"PRIu64")\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
+	mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3f%% (%"PRIu64" / %"PRIu64")\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
 }
 
 static void mpegfile_write_header(muxer_t *muxer)

Modified: trunk/libvo/font_load_ft.c
==============================================================================
--- trunk/libvo/font_load_ft.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/libvo/font_load_ft.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -202,8 +202,8 @@ static int check_font(font_desc_t *desc,
 	}
 	desc->glyph_index[unicode?character:code] = glyph_index;
     }
-//    fprintf(stderr, "font height: %lf\n", (double)(face->bbox.yMax-face->bbox.yMin)/(double)face->units_per_EM*ppem);
-//    fprintf(stderr, "font width: %lf\n", (double)(face->bbox.xMax-face->bbox.xMin)/(double)face->units_per_EM*ppem);
+//    fprintf(stderr, "font height: %f\n", (double)(face->bbox.yMax-face->bbox.yMin)/(double)face->units_per_EM*ppem);
+//    fprintf(stderr, "font width: %f\n", (double)(face->bbox.xMax-face->bbox.xMin)/(double)face->units_per_EM*ppem);
 
     ymax = (double)(face->bbox.yMax)/(double)face->units_per_EM*ppem+1;
     ymin = (double)(face->bbox.yMin)/(double)face->units_per_EM*ppem-1;
@@ -593,13 +593,13 @@ void render_one_glyph(font_desc_t *desc,
 		desc->tables.omt, desc->tables.o_r, desc->tables.o_w,
 		desc->tables.o_size);
     }
-//    fprintf(stderr, "fg: outline t = %lf\n", GetTimer()-t);
+//    fprintf(stderr, "fg: outline t = %f\n", GetTimer()-t);
 
     if (desc->tables.g_r) {
 	blur(abuffer+off, desc->tables.tmp, width, height, stride,
 	     desc->tables.gt2, desc->tables.g_r,
 	     desc->tables.g_w);
-//	fprintf(stderr, "fg: blur t = %lf\n", GetTimer()-t);
+//	fprintf(stderr, "fg: blur t = %f\n", GetTimer()-t);
     }
 
     resample_alpha(abuffer+off, bbuffer+off, width, height, stride, font_factor);
@@ -638,9 +638,9 @@ static int prepare_font(font_desc_t *des
 //    ttime = GetTimer();
     err = check_font(desc, ppem, padding, pic_idx, charset_size, charset, charcodes, unicode);
 //    ttime=GetTimer()-ttime;
-//    printf("render:   %7lf us\n",ttime);
+//    printf("render:   %7f us\n",ttime);
     if (err) return -1;
-//    fprintf(stderr, "fg: render t = %lf\n", GetTimer()-t);
+//    fprintf(stderr, "fg: render t = %f\n", GetTimer()-t);
 
     desc->pic_a[pic_idx]->w = desc->pic_b[pic_idx]->w;
     desc->pic_a[pic_idx]->h = desc->pic_b[pic_idx]->h;
@@ -1024,7 +1024,7 @@ font_desc_t* read_font_desc_ft(const cha
     goto err_out;
 #endif
 
-//    fprintf(stderr, "fg: prepare t = %lf\n", GetTimer()-t);
+//    fprintf(stderr, "fg: prepare t = %f\n", GetTimer()-t);
 
     err = prepare_font(desc, face, subtitle_font_ppem, desc->face_cnt-1,
 		       charset_size, my_charset, my_charcodes, unicode,

Modified: trunk/loader/win32.c
==============================================================================
--- trunk/loader/win32.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/loader/win32.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -4553,7 +4553,7 @@ static double exp_CIpow(void)
 {
     FPU_DOUBLES(x,y);
 
-    dbgprintf("_CIpow(%lf, %lf)\n", x, y);
+    dbgprintf("_CIpow(%f, %f)\n", x, y);
     return pow(x, y);
 }
 
@@ -5008,7 +5008,7 @@ static const char * WINAPI expPathFindFi
 
 static double expfloor(double x)
 {
-    dbgprintf("floor(%lf)\n", x);
+    dbgprintf("floor(%f)\n", x);
     return floor(x);
 }
 
@@ -5019,7 +5019,7 @@ static double exp_CIcos(void)
 {
     FPU_DOUBLE(x);
 
-    dbgprintf("_CIcos(%lf)\n", x);
+    dbgprintf("_CIcos(%f)\n", x);
     return cos(x);
 }
 
@@ -5027,7 +5027,7 @@ static double exp_CIsin(void)
 {
     FPU_DOUBLE(x);
 
-    dbgprintf("_CIsin(%lf)\n", x);
+    dbgprintf("_CIsin(%f)\n", x);
     return sin(x);
 }
 
@@ -5035,7 +5035,7 @@ static double exp_CIsqrt(void)
 {
     FPU_DOUBLE(x);
 
-    dbgprintf("_CIsqrt(%lf)\n", x);
+    dbgprintf("_CIsqrt(%f)\n", x);
     return sqrt(x);
 }
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/mplayer.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -582,10 +582,10 @@ static void print_file_properties(const 
       start_pts = video_start_pts;
   }
   if (start_pts != MP_NOPTS_VALUE)
-    mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_START_TIME=%.2lf\n", start_pts);
+    mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_START_TIME=%.2f\n", start_pts);
   else
     mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_START_TIME=unknown\n");
-  mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(mpctx->demuxer));
+  mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2f\n", demuxer_get_time_length(mpctx->demuxer));
   mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_SEEKABLE=%d\n",
          mpctx->stream->seek && (!mpctx->demuxer || mpctx->demuxer->seekable));
   if (mpctx->demuxer) {

Modified: trunk/stream/tvi_v4l.c
==============================================================================
--- trunk/stream/tvi_v4l.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/stream/tvi_v4l.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -1673,7 +1673,7 @@ static void *video_grabber(void *data)
                         mp_msg(MSGT_TV, MSGL_V, "\nvideo capture thread: frame delta = 0\n");
                     } else if ((interval - prev_interval < (long long)0.85e6/priv->fps)
                                || (interval - prev_interval > (long long)1.15e6/priv->fps) ) {
-                        mp_msg(MSGT_TV, MSGL_V, "\nvideo capture thread: frame delta ~ %.1lf fps\n",
+                        mp_msg(MSGT_TV, MSGL_V, "\nvideo capture thread: frame delta ~ %.1f fps\n",
                                (double)1e6/(interval - prev_interval));
                     }
                 }
@@ -1702,7 +1702,7 @@ static void *video_grabber(void *data)
                 priv->video_interval_sum += orig_interval-prev_interval;
                 if (priv->video_avg_ptr >= VIDEO_AVG_BUFFER_SIZE) priv->video_avg_ptr = 0;
 
-//              fprintf(stderr, "fps: %lf\n", (double)1e6*VIDEO_AVG_BUFFER_SIZE/priv->video_interval_sum);
+//              fprintf(stderr, "fps: %f\n", (double)1e6*VIDEO_AVG_BUFFER_SIZE/priv->video_interval_sum);
 
                 // interpolate the skew in time
                 pthread_mutex_lock(&priv->skew_mutex);
@@ -1718,7 +1718,7 @@ static void *video_grabber(void *data)
                 }
             }
 
-            mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %lf, interval = %lf, a_skew = %f, corr_skew = %f\n",
+            mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %f, interval = %f, a_skew = %f, corr_skew = %f\n",
                    (interval != prev_interval) ? (double)1e6/(interval - prev_interval) : -1,
                    (double)1e-6*interval, (double)1e-6*xskew, (double)1e-6*skew);
             mp_msg(MSGT_TV, MSGL_DBG3, "vcnt = %d, acnt = %d\n", priv->video_cnt, priv->audio_cnt);

Modified: trunk/stream/tvi_v4l2.c
==============================================================================
--- trunk/stream/tvi_v4l2.c	Sun Oct  3 22:49:50 2010	(r32437)
+++ trunk/stream/tvi_v4l2.c	Mon Oct  4 08:40:32 2010	(r32438)
@@ -1693,7 +1693,7 @@ static void *video_grabber(void *data)
             if (!priv->tv_param->noaudio) pthread_mutex_unlock(&priv->skew_mutex);
         }
         priv->curr_frame = (long long)buf.timestamp.tv_sec*1e6+buf.timestamp.tv_usec;
-//        fprintf(stderr, "idx = %d, ts = %lf\n", buf.index, (double)(priv->curr_frame) / 1e6);
+//        fprintf(stderr, "idx = %d, ts = %f\n", buf.index, (double)(priv->curr_frame) / 1e6);
 
         interval = priv->curr_frame - priv->first_frame;
         delta = interval - prev_interval;
@@ -1713,7 +1713,7 @@ static void *video_grabber(void *data)
             }
         }
 
-        mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %lf, interval = %lf, a_skew = %f, corr_skew = %f\n",
+        mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %f, interval = %f, a_skew = %f, corr_skew = %f\n",
                delta ? (double)1e6/delta : -1,
                (double)1e-6*interval, (double)1e-6*xskew, (double)1e-6*skew);
         mp_msg(MSGT_TV, MSGL_DBG3, "vcnt = %d, acnt = %d\n", priv->video_cnt, priv->audio_cnt);
@@ -1886,7 +1886,7 @@ static void *audio_grabber(void *data)
             priv->audio_start_time = start_time_avg/(priv->audio_recv_blocks_total+1);
         }
 
-//        fprintf(stderr, "spb = %lf, bs = %d, skew = %lf\n", priv->audio_secs_per_block, priv->audio_in.blocksize,
+//        fprintf(stderr, "spb = %f, bs = %d, skew = %f\n", priv->audio_secs_per_block, priv->audio_in.blocksize,
 //                (double)(current_time - 1e6*priv->audio_secs_per_block*priv->audio_recv_blocks_total)/1e6);
 
         // put the current skew into the ring buffer
@@ -1938,7 +1938,7 @@ static void *audio_grabber(void *data)
         priv->audio_skew += priv->audio_start_time - priv->first_frame;
         pthread_mutex_unlock(&priv->skew_mutex);
 
-//        fprintf(stderr, "audio_skew = %lf, delta = %lf\n", (double)priv->audio_skew/1e6, (double)priv->audio_skew_delta_total/1e6);
+//        fprintf(stderr, "audio_skew = %f, delta = %f\n", (double)priv->audio_skew/1e6, (double)priv->audio_skew_delta_total/1e6);
 
         pthread_mutex_lock(&priv->audio_mutex);
         if ((priv->audio_tail+1) % priv->audio_buffer_size == priv->audio_head) {


More information about the MPlayer-cvslog mailing list