[FFmpeg-cvslog] avcodec/srtenc, webvttenc: Use av_printf_format

Andreas Rheinhardt git at videolan.org
Thu Feb 22 02:54:18 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Feb 18 01:29:23 2024 +0100| [e9a587af25f62551708798218bb630c9e68f5104] | committer: Andreas Rheinhardt

avcodec/srtenc, webvttenc: Use av_printf_format

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/srtenc.c    | 5 +----
 libavcodec/webvttenc.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 9b6f61ebd1..a607beb990 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -41,10 +41,7 @@ typedef struct {
 } SRTContext;
 
 
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif
-static void srt_print(SRTContext *s, const char *str, ...)
+static av_printf_format(2, 3) void srt_print(SRTContext *s, const char *str, ...)
 {
     va_list vargs;
     va_start(vargs, str);
diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c
index 9922f33485..3b66b4f2dd 100644
--- a/libavcodec/webvttenc.c
+++ b/libavcodec/webvttenc.c
@@ -38,10 +38,7 @@ typedef struct {
     int stack_ptr;
 } WebVTTContext;
 
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif
-static void webvtt_print(WebVTTContext *s, const char *str, ...)
+static av_printf_format(2, 3) void webvtt_print(WebVTTContext *s, const char *str, ...)
 {
     va_list vargs;
     va_start(vargs, str);



More information about the ffmpeg-cvslog mailing list