---
ffmpeg.c | 2 +-
ffserver.c | 4 ++--
libavformat/avio.c | 6 +++++-
libavformat/avio.h | 3 ++-
libavformat/img2.c | 6 +++---
5 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 83e77dd..d7d1764 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3733,7 +3733,7 @@ static void opt_output_file(const char *filename)
(strchr(filename, ':') == NULL ||
filename[1] == ':' ||
av_strstart(filename, "file:", NULL))) {
- if (url_exist(filename)) {
+ if (avio_exist(filename)) {
if (!using_stdin) {
fprintf(stderr,"File '%s' already exists. Overwrite ?
[y/N] ", filename);
fflush(stderr);
diff --git a/ffserver.c b/ffserver.c
index 259aaca..021b2e5 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3684,7 +3684,7 @@ static void build_feed_streams(void)
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
int fd;
- if (url_exist(feed->feed_filename)) {
+ if (avio_exist(feed->feed_filename)) {
/* See if it matches */
AVFormatContext *s;
int matches = 0;
@@ -3757,7 +3757,7 @@ static void build_feed_streams(void)
unlink(feed->feed_filename);
}
}
- if (!url_exist(feed->feed_filename)) {
+ if (!avio_exist(feed->feed_filename)) {
AVFormatContext s1 = {0}, *s = &s1;
if (feed->readonly) {
diff --git a/libavformat/avio.c b/libavformat/avio.c
index cdf18f6..cc5836e 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -236,6 +236,10 @@ int av_register_protocol2(URLProtocol *protocol, int size)
{
return ffurl_register_protocol(protocol, size);
}
+int url_exist(const char *filename)
+{
+ return avio_exist(filename);
+}
#endif
#define URL_SCHEME_CHARS \
@@ -365,7 +369,7 @@ int ffurl_close(URLContext *h)
return ret;
}
-int url_exist(const char *filename)
+int avio_exist(const char *filename)
{
URLContext *h;
if (ffurl_open(&h, filename, AVIO_RDONLY) < 0)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index b27ec80..8302708 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -116,13 +116,14 @@ attribute_deprecated int av_url_read_pause(URLContext *h,
int pause);
attribute_deprecated int64_t av_url_read_seek(URLContext *h, int stream_index,
int64_t timestamp, int flags);
attribute_deprecated void url_set_interrupt_cb(int (*interrupt_cb)(void));
+attribute_deprecated int url_exist(const char *url);
#endif
/**
* Return a non-zero value if the resource indicated by url
* exists, 0 otherwise.
*/
-int url_exist(const char *url);
+int avio_exist(const char *url);
/**
* The callback is called in blocking functions to test regulary if
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 59d9150..6022301 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -130,11 +130,11 @@ static int find_image_range(int *pfirst_index, int
*plast_index,
if (av_get_frame_filename(buf, sizeof(buf), path, first_index) < 0){
*pfirst_index =
*plast_index = 1;
- if(url_exist(buf))
+ if(avio_exist(buf))
return 0;
return -1;
}
- if (url_exist(buf))
+ if (avio_exist(buf))
break;
}
if (first_index == 5)
@@ -152,7 +152,7 @@ static int find_image_range(int *pfirst_index, int
*plast_index,
if (av_get_frame_filename(buf, sizeof(buf), path,
last_index + range1) < 0)
goto fail;
- if (!url_exist(buf))
+ if (!avio_exist(buf))
break;
range = range1;
/* just in case... */
--
1.7.4.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel