[vlmc-devel] commit: Use PRId64 when dealing with qint64 (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Wed Mar 17 21:12:08 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Wed Mar 17 19:56:23 2010 +0100| [f0c9f1e7dcca9a6386081d77e42f859d310e37eb] | committer: Hugo Beauzee-Luyssen 

Use PRId64 when dealing with qint64

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=f0c9f1e7dcca9a6386081d77e42f859d310e37eb
---

 src/LibVLCpp/VLCMedia.cpp         |   16 ++++++++++------
 src/Renderer/WorkflowRenderer.cpp |    1 +
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/LibVLCpp/VLCMedia.cpp b/src/LibVLCpp/VLCMedia.cpp
index a3caa04..e7c0acf 100644
--- a/src/LibVLCpp/VLCMedia.cpp
+++ b/src/LibVLCpp/VLCMedia.cpp
@@ -25,6 +25,10 @@
 #include "VLCMedia.h"
 #include "VLCInstance.h"
 
+//Allow PRId64 to be defined:
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+
 using namespace LibVLCpp;
 
 Media::Media( const QString& filename ) :
@@ -46,28 +50,28 @@ void                    Media::addOption( const char* opt )
 void                    Media::setVideoLockCallback( void* callback )
 {
     char    param[64];
-    sprintf( param, ":sout-smem-video-prerender-callback=%lld", (qint64)(intptr_t)callback );
+    sprintf( param, ":sout-smem-video-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
     addOption(param);
 }
 
 void                    Media::setVideoUnlockCallback( void* callback )
 {
     char    param[64];
-    sprintf( param, ":sout-smem-video-postrender-callback=%lld", (qint64)(intptr_t)callback );
+    sprintf( param, ":sout-smem-video-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
     addOption( param );
 }
 
 void                    Media::setAudioLockCallback( void* callback )
 {
     char    param[64];
-    sprintf( param, ":sout-smem-audio-prerender-callback=%lld", (qint64)(intptr_t)callback );
+    sprintf( param, ":sout-smem-audio-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
     addOption(param);
 }
 
 void                    Media::setAudioUnlockCallback( void* callback )
 {
     char    param[64];
-    sprintf( param, ":sout-smem-audio-postrender-callback=%lld", (qint64)(intptr_t)callback );
+    sprintf( param, ":sout-smem-audio-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
     addOption( param );
 }
 
@@ -75,7 +79,7 @@ void                    Media::setVideoDataCtx( void* dataCtx )
 {
     char    param[64];
 
-    sprintf( param, ":sout-smem-video-data=%lld", (qint64)(intptr_t)dataCtx );
+    sprintf( param, ":sout-smem-video-data=%"PRId64, (qint64)(intptr_t)dataCtx );
     addOption( param );
 }
 
@@ -83,7 +87,7 @@ void                    Media::setAudioDataCtx( void* dataCtx )
 {
     char    param[64];
 
-    sprintf( param, ":sout-smem-audio-data=%lld", (qint64)(intptr_t)dataCtx );
+    sprintf( param, ":sout-smem-audio-data=%"PRId64, (qint64)(intptr_t)dataCtx );
     addOption( param );
 }
 
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index fdba92c..d644071 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -23,6 +23,7 @@
 #include <QtDebug>
 #include <QThread>
 #include <QWaitCondition>
+//Allow PRId64 to be defined:
 #define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 



More information about the Vlmc-devel mailing list