[FFmpeg-devel] [PATCH v4 2/4] fftools/opt_common: add memaddresses log flag

softworkz ffmpegagent at gmail.com
Sun Mar 9 01:02:42 EET 2025


From: softworkz <softworkz at hotmail.com>

This commit adds the memaddresses log flag.
When specifying this flag at the command line, context prefixes will
be printed with memory addresses like in earlier ffmpeg versions.

Example with memaddresses flag:

[hevc @ 0000018e72a89cc0] .....

without (new behavior):

[hevc #0] .....

Signed-off-by: softworkz <softworkz at hotmail.com>
---
 fftools/opt_common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fftools/opt_common.c b/fftools/opt_common.c
index 2ac3fd4fb3..b71ecc4b31 100644
--- a/fftools/opt_common.c
+++ b/fftools/opt_common.c
@@ -1304,6 +1304,12 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
             } else {
                 flags |= AV_LOG_PRINT_DATETIME;
             }
+        } else if (av_strstart(token, "memaddresses", &arg)) {
+            if (cmd == '-') {
+                flags &= ~AV_LOG_PRINT_MEMADDRESSES;
+            } else {
+                flags |= AV_LOG_PRINT_MEMADDRESSES;
+            }
         } else {
             break;
         }
-- 
ffmpeg-codebot



More information about the ffmpeg-devel mailing list