[FFmpeg-cvslog] avfilter/avfilter: #if ff_tlog_link() away when empty

Andreas Rheinhardt git at videolan.org
Wed Sep 14 22:53:27 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Sep 12 17:52:18 2022 +0200| [e10774a8cc539e166d4e5849fef4d9f86efbfa8d] | committer: Andreas Rheinhardt

avfilter/avfilter: #if ff_tlog_link() away when empty

It is currently calling av_channel_layout_describe()
unnecessarily.

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavfilter/avfilter.c | 2 ++
 libavfilter/internal.h | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index bde41637dd..f34204e650 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -381,6 +381,7 @@ int avfilter_config_links(AVFilterContext *filter)
     return 0;
 }
 
+#ifdef TRACE
 void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
 {
     if (link->type == AVMEDIA_TYPE_VIDEO) {
@@ -404,6 +405,7 @@ void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
                 end ? "\n" : "");
     }
 }
+#endif
 
 int ff_request_frame(AVFilterLink *link)
 {
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 0f8da367d0..0128820be0 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -268,7 +268,11 @@ void ff_command_queue_pop(AVFilterContext *filter);
 
 char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms);
 
+#ifdef TRACE
 void ff_tlog_link(void *ctx, AVFilterLink *link, int end);
+#else
+#define ff_tlog_link(ctx, link, end) do { } while(0)
+#endif
 
 /**
  * Append a new input/output pad to the filter's list of such pads.



More information about the ffmpeg-cvslog mailing list