[FFmpeg-cvslog] lavu/timestamp: Avoid C++-unfriendly code in user header

Mark Thompson git at videolan.org
Thu Sep 1 22:02:35 EEST 2016


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Aug 31 20:48:45 2016 +0100| [a2c912c3b6b833f2aacf414264c566f86f0a4e7c] | committer: Mark Thompson

lavu/timestamp: Avoid C++-unfriendly code in user header

Including this header in a C++11 program (inside extern "C") will
throw an error because it looks like a user-defined literal.  Add a
space between the two tokens to avoid the problem.

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

 libavutil/timestamp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h
index f010a7e..e082f01 100644
--- a/libavutil/timestamp.h
+++ b/libavutil/timestamp.h
@@ -43,7 +43,7 @@
 static inline char *av_ts_make_string(char *buf, int64_t ts)
 {
     if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
-    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64, ts);
+    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, "%" PRId64, ts);
     return buf;
 }
 



More information about the ffmpeg-cvslog mailing list