[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40970] trunk/blender/source/blender/imbuf /intern/anim_movie.c: quiet compiler warnings for string formatting in ffmpeg logging

Campbell Barton ideasman42 at gmail.com
Thu Oct 13 00:00:54 CEST 2011


Revision: 40970
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40970
Author:   campbellbarton
Date:     2011-10-12 22:00:53 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
quiet compiler warnings for string formatting in ffmpeg logging

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/anim_movie.c

Modified: trunk/blender/source/blender/imbuf/intern/anim_movie.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/anim_movie.c	2011-10-12 18:56:55 UTC (rev 40969)
+++ trunk/blender/source/blender/imbuf/intern/anim_movie.c	2011-10-12 22:00:53 UTC (rev 40970)
@@ -749,9 +749,9 @@
 			       "  FRAME DONE: "
 				"next_pts=%lld pkt_pts=%lld\n",
 				(anim->pFrame->pts == AV_NOPTS_VALUE) ? 
-				-1 : anim->pFrame->pts, 
+				-1 : (long long int)anim->pFrame->pts,
 				(anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
-				-1 : anim->pFrame->pkt_pts);
+				-1 : (long long int)anim->pFrame->pkt_pts);
 			anim->next_pts = 
 				av_get_pts_from_frame(anim->pFormatCtx,
 						      anim->pFrame);
@@ -771,9 +771,9 @@
 		       anim->next_packet.stream_index, 
 		       anim->videoStream,
 		       (anim->next_packet.dts == AV_NOPTS_VALUE) ? -1:
-		       anim->next_packet.dts,
+		       (long long int)anim->next_packet.dts,
 		       (anim->next_packet.pts == AV_NOPTS_VALUE) ? -1:
-		       anim->next_packet.pts,
+		       (long long int)anim->next_packet.pts,
 		       (anim->next_packet.flags & AV_PKT_FLAG_KEY) ? 
 		       " KEY" : "");
 		if (anim->next_packet.stream_index == anim->videoStream) {
@@ -800,11 +800,11 @@
 				       "  FRAME DONE: next_pts=%lld "
 				       "pkt_pts=%lld, guessed_pts=%lld\n",
 				       (anim->pFrame->pts == AV_NOPTS_VALUE) ?
-				       -1 : anim->pFrame->pts, 
+				       -1 : (long long int)anim->pFrame->pts,
 				       (anim->pFrame->pkt_pts 
 					== AV_NOPTS_VALUE) ?
-				       -1 : anim->pFrame->pkt_pts,
-					anim->next_pts);
+				       -1 : (long long int)anim->pFrame->pkt_pts,
+					(long long int)anim->next_pts);
 			}
 		}
 		av_free_packet(&anim->next_packet);
@@ -828,13 +828,13 @@
 	av_log(anim->pFormatCtx,
 	       AV_LOG_DEBUG, 
 	       "SCAN start: considering pts=%lld in search of %lld\n", 
-	       anim->next_pts, pts_to_search);
+	       (long long int)anim->next_pts, (long long int)pts_to_search);
 
 	while (count > 0 && anim->next_pts < pts_to_search) {
 		av_log(anim->pFormatCtx,
 		       AV_LOG_DEBUG, 
 		       "  WHILE: pts=%lld in search of %lld\n", 
-		       anim->next_pts, pts_to_search);
+		       (long long int)anim->next_pts, (long long int)pts_to_search);
 		if (!ffmpeg_decode_video_frame(anim)) {
 			break;
 		}
@@ -845,7 +845,7 @@
 		       AV_LOG_ERROR, 
 		       "SCAN failed: completely lost in stream, "
 		       "bailing out at PTS=%lld, searching for PTS=%lld\n", 
-		       anim->next_pts, pts_to_search);
+		       (long long int)anim->next_pts, (long long int)pts_to_search);
 	}
 	if (anim->next_pts == pts_to_search) {
 		av_log(anim->pFormatCtx,
@@ -942,13 +942,13 @@
 	av_log(anim->pFormatCtx, AV_LOG_DEBUG, 
 	       "FETCH: looking for PTS=%lld "
 	       "(pts_timebase=%g, frame_rate=%g, st_time=%lld)\n", 
-	       pts_to_search, pts_time_base, frame_rate, st_time);
+	       (long long int)pts_to_search, pts_time_base, frame_rate, st_time);
 
 	if (anim->last_frame && 
 	    anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search){
 		av_log(anim->pFormatCtx, AV_LOG_DEBUG, 
 		       "FETCH: frame repeat: last: %lld next: %lld\n",
-		       anim->last_pts, anim->next_pts);
+		       (long long int)anim->last_pts, (long long int)anim->next_pts);
 		IMB_refImBuf(anim->last_frame);
 		anim->curposition = position;
 		return anim->last_frame;
@@ -961,7 +961,8 @@
 		av_log(anim->pFormatCtx, AV_LOG_DEBUG, 
 		       "FETCH: no seek necessary: "
 			"next: %lld next undecoded: %lld\n",
-			anim->next_pts, anim->next_undecoded_pts);
+			(long long int)anim->next_pts,
+		    (long long int)anim->next_undecoded_pts);
 
 		/* we are already done :) */
 
@@ -1035,7 +1036,7 @@
 			       "FETCH: "
 			       "error while seeking to DTS = %lld "
 			       "(frameno = %d, PTS = %lld): errcode = %d\n", 
-			       pos, position, pts_to_search, ret);
+			       pos, position, (long long int)pts_to_search, ret);
 		}
 
 		avcodec_flush_buffers(anim->pCodecCtx);




More information about the Bf-blender-cvs mailing list