Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-26 14:48:18 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-04 00:21:57 +0300
commitd09776d48651eeba10e1b5f2e5fba612b48b95f4 (patch)
treebd5551ae3b10aeb75e64c0193e0cb8084636cb31 /libavformat
parente4beb307ab26816128678235641a13dfdb8d07d0 (diff)
avformat/avio: Schedule AVIODirContext to become an opaque type
Users can't make anything with its content. Making it opaque might allow us to avoid one level of indirection. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio.c6
-rw-r--r--libavformat/avio.h4
-rw-r--r--libavformat/version.h2
-rw-r--r--libavformat/version_major.h1
4 files changed, 12 insertions, 1 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 4846bbd8c6..ab1c19a58d 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -528,6 +528,12 @@ int ffurl_delete(const char *url)
return ret;
}
+#if !FF_API_AVIODIRCONTEXT
+struct AVIODirContext {
+ struct URLContext *url_context;
+};
+#endif
+
int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
{
URLContext *h = NULL;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 36c3d7b430..7e4aa9a1c8 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -101,9 +101,13 @@ typedef struct AVIODirEntry {
int64_t filemode; /**< Unix file mode, -1 if unknown. */
} AVIODirEntry;
+#if FF_API_AVIODIRCONTEXT
typedef struct AVIODirContext {
struct URLContext *url_context;
} AVIODirContext;
+#else
+typedef struct AVIODirContext AVIODirContext;
+#endif
/**
* Different data types that can be returned via the AVIO
diff --git a/libavformat/version.h b/libavformat/version.h
index 6c740dd187..647a773ed5 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#include "version_major.h"
-#define LIBAVFORMAT_VERSION_MINOR 33
+#define LIBAVFORMAT_VERSION_MINOR 34
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index 099a17873f..86af3ee4a5 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -47,6 +47,7 @@
#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60)
+#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_R_FRAME_RATE 1