[FFmpeg-cvslog] avformat/avio_internal: Don't include url.h
Andreas Rheinhardt
git at videolan.org
Sun Sep 10 22:35:19 EEST 2023
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Sep 6 20:21:59 2023 +0200| [4f98bf9dbd0ef6a401fad40f6275ebd3904c83bf] | committer: Andreas Rheinhardt
avformat/avio_internal: Don't include url.h
It is only included because two very rarely used functions
use pointers to URLContexts; use struct URLContext instead.
Also move ffio_geturlcontext() so that one can avoid
a forward declaration of struct URLContext (which would be
necessary as soon as FF_API_AVIODIRCONTEXT is no more).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f98bf9dbd0ef6a401fad40f6275ebd3904c83bf
---
libavformat/avio_internal.h | 19 +++++++++----------
libavformat/dashdec.c | 1 +
libavformat/format.c | 1 +
libavformat/hls.c | 1 +
libavformat/hlsenc.c | 1 +
libavformat/rtpenc_chain.c | 1 +
6 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 57796ade03..aef6ab660e 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -20,7 +20,6 @@
#define AVFORMAT_AVIO_INTERNAL_H
#include "avio.h"
-#include "url.h"
#include "libavutil/log.h"
@@ -194,6 +193,14 @@ unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf,
*/
int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
+/**
+ * Return the URLContext associated with the AVIOContext
+ *
+ * @param s IO context
+ * @return pointer to URLContext or NULL.
+ */
+struct URLContext *ffio_geturlcontext(AVIOContext *s);
+
/**
* Create and initialize a AVIOContext for accessing the
* resource referenced by the URLContext h.
@@ -205,15 +212,7 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
* @return >= 0 in case of success, a negative value corresponding to an
* AVERROR code in case of failure
*/
-int ffio_fdopen(AVIOContext **s, URLContext *h);
-
-/**
- * Return the URLContext associated with the AVIOContext
- *
- * @param s IO context
- * @return pointer to URLContext or NULL.
- */
-URLContext *ffio_geturlcontext(AVIOContext *s);
+int ffio_fdopen(AVIOContext **s, struct URLContext *h);
/**
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index f4af625814..cbe34f4f50 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -29,6 +29,7 @@
#include "avio_internal.h"
#include "dash.h"
#include "demux.h"
+#include "url.h"
#define INITIAL_BUFFER_SIZE 32768
diff --git a/libavformat/format.c b/libavformat/format.c
index c91f71057a..477ad6b43b 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -30,6 +30,7 @@
#include "avformat.h"
#include "id3v2.h"
#include "internal.h"
+#include "url.h"
/**
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 276e4ee333..b2a93d578b 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -43,6 +43,7 @@
#include "internal.h"
#include "avio_internal.h"
#include "id3v2.h"
+#include "url.h"
#include "hls_sample_encryption.h"
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 12e20580ee..08f3746ce7 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -51,6 +51,7 @@
#include "internal.h"
#include "mux.h"
#include "os_support.h"
+#include "url.h"
typedef enum {
HLS_START_SEQUENCE_AS_START_NUMBER = 0,
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index cd751f48b6..45d0e313fd 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -23,6 +23,7 @@
#include "avio_internal.h"
#include "rtpenc_chain.h"
#include "rtp.h"
+#include "url.h"
#include "libavutil/opt.h"
int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
More information about the ffmpeg-cvslog
mailing list