summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <[email protected]>2025-08-27 08:36:39 +0200
committerMarton Balint <[email protected]>2025-09-05 21:05:13 +0200
commit9458a6f8ec2a8048fa1d672b6b27fcc56fd14cb1 (patch)
tree8d3a76e143595b73b5433b14dd22d5b5e054c57e
parent7a1c737c359509f59c8552e79b2fa6a191d61ad9 (diff)
avformat/utils: add AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION flag
Signed-off-by: Marton Balint <[email protected]>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavformat/avformat.h3
-rw-r--r--libavformat/utils.c2
-rw-r--r--libavformat/version.h4
4 files changed, 8 insertions, 4 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index d69aaf2215..5b07848c0a 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:
+2025-09-xx - xxxxxxxx - lavf 62.5.100 - avformat.h
+ Add AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION
+
2025-09-xx - xxxxxxxxxx - lavu 60.12.100 - hwcontext_d3d12va.h
Add support for texture array mode AVD3D12VAFrame.subresource_index,
AVD3D12VAFramesContext.texture_array
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index be6e532387..a7446546e5 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2819,7 +2819,8 @@ void av_dump_format(AVFormatContext *ic,
int is_output);
-#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 ///< Allow multiple %d
+#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 ///< Allow multiple %d
+#define AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION 2 ///< Ignore truncated output instead of returning an error
/**
* Return in 'buf' the path with '%d' replaced by a number.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8a249ad85a..9b29ae26d0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -327,7 +327,7 @@ addchar:
}
if (!percentd_found)
goto fail;
- if (!av_bprint_is_complete(buf))
+ if (!(flags & AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION) && !av_bprint_is_complete(buf))
return AVERROR(ENOMEM);
return 0;
fail:
diff --git a/libavformat/version.h b/libavformat/version.h
index 858a94cc5d..e2634b85ae 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,8 +31,8 @@
#include "version_major.h"
-#define LIBAVFORMAT_VERSION_MINOR 4
-#define LIBAVFORMAT_VERSION_MICRO 102
+#define LIBAVFORMAT_VERSION_MINOR 5
+#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \