aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-01-10 12:18:29 +0100
committerAnton Khirnov <anton@khirnov.net>2021-05-22 15:27:55 +0200
commit9d4c018497c7fb989dc68baeaf53a04aa1d7bd01 (patch)
tree0607ddfda0fc315e53753781f19066d209dd3096
parentf27e3ccf06ee19935d160164ca4a02f28cfc2a27 (diff)
downloadffmpeg-9d4c018497c7fb989dc68baeaf53a04aa1d7bd01.tar.gz
avio: do not export avpriv_io_{move,delete}
They are private and not used by anything outside of lavf. There is no reason for them to be exported.
-rw-r--r--libavformat/avio.c6
-rw-r--r--libavformat/avio.h19
-rw-r--r--libavformat/dashenc.c2
-rw-r--r--libavformat/internal.h2
-rw-r--r--libavformat/url.h19
5 files changed, 24 insertions, 24 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 2974f4b2b4..ab3079116e 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -487,7 +487,7 @@ int avio_check(const char *url, int flags)
return ret;
}
-int avpriv_io_move(const char *url_src, const char *url_dst)
+int ffurl_move(const char *url_src, const char *url_dst)
{
URLContext *h_src, *h_dst;
int ret = ffurl_alloc(&h_src, url_src, AVIO_FLAG_READ_WRITE, NULL);
@@ -509,7 +509,7 @@ int avpriv_io_move(const char *url_src, const char *url_dst)
return ret;
}
-int avpriv_io_delete(const char *url)
+int ffurl_delete(const char *url)
{
URLContext *h;
int ret = ffurl_alloc(&h, url, AVIO_FLAG_WRITE, NULL);
@@ -661,7 +661,7 @@ int ff_check_interrupt(AVIOInterruptCB *cb)
int ff_rename(const char *url_src, const char *url_dst, void *logctx)
{
- int ret = avpriv_io_move(url_src, url_dst);
+ int ret = ffurl_move(url_src, url_dst);
if (ret < 0)
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", url_src, url_dst, av_err2str(ret));
return ret;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index d022820a6e..0b35409787 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -375,25 +375,6 @@ const char *avio_find_protocol_name(const char *url);
int avio_check(const char *url, int flags);
/**
- * Move or rename a resource.
- *
- * @note url_src and url_dst should share the same protocol and authority.
- *
- * @param url_src url to resource to be moved
- * @param url_dst new url to resource if the operation succeeded
- * @return >=0 on success or negative on error.
- */
-int avpriv_io_move(const char *url_src, const char *url_dst);
-
-/**
- * Delete a resource.
- *
- * @param url resource to be deleted.
- * @return >=0 on success or negative on error.
- */
-int avpriv_io_delete(const char *url);
-
-/**
* Open directory for reading.
*
* @param s directory read context. Pointer to a NULL pointer must be passed.
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 07f191e2a2..ebbdfd627c 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1845,7 +1845,7 @@ static void dashenc_delete_file(AVFormatContext *s, char *filename) {
av_dict_free(&http_opts);
ff_format_io_close(s, &out);
} else {
- int res = avpriv_io_delete(filename);
+ int res = ffurl_delete(filename);
if (res < 0) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
av_strerror(res, errbuf, sizeof(errbuf));
diff --git a/libavformat/internal.h b/libavformat/internal.h
index d57e63c1c2..970fccf6c2 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -792,7 +792,7 @@ int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *a
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src);
/**
- * Wrap avpriv_io_move and log if error happens.
+ * Wrap ffurl_move() and log if error happens.
*
* @param url_src source path
* @param url_dst destination path
diff --git a/libavformat/url.h b/libavformat/url.h
index 40e6c1d17c..a129150d76 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -388,4 +388,23 @@ typedef struct URLComponents {
*/
int ff_url_decompose(URLComponents *uc, const char *url, const char *end);
+/**
+ * Move or rename a resource.
+ *
+ * @note url_src and url_dst should share the same protocol and authority.
+ *
+ * @param url_src url to resource to be moved
+ * @param url_dst new url to resource if the operation succeeded
+ * @return >=0 on success or negative on error.
+ */
+int ffurl_move(const char *url_src, const char *url_dst);
+
+/**
+ * Delete a resource.
+ *
+ * @param url resource to be deleted.
+ * @return >=0 on success or negative on error.
+ */
+int ffurl_delete(const char *url);
+
#endif /* AVFORMAT_URL_H */