diff mbox series

[FFmpeg-devel,2/3] avfilter/avfilter: #if ff_tlog_link() away when empty

Message ID AS8P250MB07446DE1CEA424B2F86137858F449@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit e10774a8cc539e166d4e5849fef4d9f86efbfa8d
Headers show
Series [FFmpeg-devel,v2,1/3] avfilter/avfilter: Don't use AVFrame.channel_layout | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 12, 2022, 4:07 p.m. UTC
It is currently calling av_channel_layout_describe()
unnecessarily.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.c | 2 ++
 libavfilter/internal.h | 4 ++++
 2 files changed, 6 insertions(+)
diff mbox series

Patch

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.