This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit f2b13f783ac5af8a16d046e8330341e56e9b1c7f
Author:     Niklas Haas <[email protected]>
AuthorDate: Sat Jan 31 11:50:34 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Mon Feb 9 14:01:14 2026 +0000

    avformat: add AVFormatContext.name
    
    Analog to AVFilterContext. May be used to set a custom logging name to
    disambiguate multiple AVFormatContext instances in the logs.
---
 doc/APIchanges         | 3 +++
 libavformat/avformat.c | 1 +
 libavformat/avformat.h | 5 +++++
 libavformat/options.c  | 3 ++-
 libavformat/version.h  | 4 ++--
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index ee3167bb14..59655434a7 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2026-02-xx - xxxxxxxxxx - lavf 62.9.100 - avformat.h
+  Add AVFormatContext.name.
+
 2026-01-xx - xxxxxxxxxx - lavu 60.24.100 - hwcontext_d3d11va.h
   Add BindFlags and MiscFlags to AVD3D11VADeviceContext
 
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index ee3f7ee1b2..806f8dcab2 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -190,6 +190,7 @@ void avformat_free_context(AVFormatContext *s)
     if (s->iformat)
         ff_flush_packet_queue(s);
     av_freep(&s->url);
+    av_freep(&s->name);
     av_free(s);
 }
 
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index bd34132e00..479f1f51c1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1884,6 +1884,11 @@ typedef struct AVFormatContext {
      * @see skip_estimate_duration_from_pts
      */
     int64_t duration_probesize;
+
+    /**
+     * Name of this format context, only used for logging purposes.
+     */
+    char *name;
 } AVFormatContext;
 
 /**
diff --git a/libavformat/options.c b/libavformat/options.c
index 28aa2da942..d08013bfd4 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -45,7 +45,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
 static const char* format_to_name(void* ptr)
 {
     AVFormatContext* fc = (AVFormatContext*) ptr;
-    if(fc->iformat) return fc->iformat->name;
+    if (fc->name) return fc->name;
+    else if(fc->iformat) return fc->iformat->name;
     else if(fc->oformat) return fc->oformat->name;
     else return fc->av_class->class_name;
 }
diff --git a/libavformat/version.h b/libavformat/version.h
index 1d3a53875a..1b079ebce8 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,8 +31,8 @@
 
 #include "version_major.h"
 
-#define LIBAVFORMAT_VERSION_MINOR   8
-#define LIBAVFORMAT_VERSION_MICRO 102
+#define LIBAVFORMAT_VERSION_MINOR   9
+#define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to