From: softworkz <softwo...@hotmail.com>

This commit adds the mem 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 mem flag:

[hevc @ 0000018e72a89cc0] .....

without (new behavior):

[hevc] .....

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

diff --git a/fftools/opt_common.c b/fftools/opt_common.c
index c2f6b9de2a..e4afef7707 100644
--- a/fftools/opt_common.c
+++ b/fftools/opt_common.c
@@ -1301,6 +1301,12 @@ int opt_loglevel(void *optctx, const char *opt, const 
char *arg)
             } else {
                 flags |= AV_LOG_PRINT_DATETIME;
             }
+        } else if (av_strstart(token, "mem", &arg)) {
+            if (cmd == '-') {
+                flags &= ~AV_LOG_PRINT_MEMADDRESS;
+            } else {
+                flags |= AV_LOG_PRINT_MEMADDRESS;
+            }
         } else {
             break;
         }
@@ -1332,6 +1338,7 @@ int opt_loglevel(void *optctx, const char *opt, const 
char *arg)
         av_log(NULL, AV_LOG_FATAL, "\"level\"\n");
         av_log(NULL, AV_LOG_FATAL, "\"time\"\n");
         av_log(NULL, AV_LOG_FATAL, "\"datetime\"\n");
+        av_log(NULL, AV_LOG_FATAL, "\"mem\"\n");
         return AVERROR(EINVAL);
     }
 
-- 
ffmpeg-codebot

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to