[FFmpeg-cvslog] avio: do not export avpriv_io_{move,delete}

Anton Khirnov git at videolan.org
Sat May 22 16:29:34 EEST 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Jan 10 12:18:29 2020 +0100| [9d4c018497c7fb989dc68baeaf53a04aa1d7bd01] | committer: Anton Khirnov

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d4c018497c7fb989dc68baeaf53a04aa1d7bd01
---

 libavformat/avio.c     |  6 +++---
 libavformat/avio.h     | 19 -------------------
 libavformat/dashenc.c  |  2 +-
 libavformat/internal.h |  2 +-
 libavformat/url.h      | 19 +++++++++++++++++++
 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
@@ -374,25 +374,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.
  *
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 */



More information about the ffmpeg-cvslog mailing list