summaryrefslogtreecommitdiffstats
path: root/libavformat/concat.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/concat.c')
-rw-r--r--libavformat/concat.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavformat/concat.c b/libavformat/concat.c
index 3659079..c066826 100644
--- a/libavformat/concat.c
+++ b/libavformat/concat.c
@@ -24,6 +24,7 @@
#include "avformat.h"
#include "libavutil/avstring.h"
#include "libavutil/mem.h"
+#include "url.h"
#define AV_CAT_SEPARATOR "|"
@@ -46,7 +47,7 @@ static av_cold int concat_close(URLContext *h)
struct concat_nodes *nodes = data->nodes;
for (i = 0; i != data->length; i++)
- err |= url_close(nodes[i].uc);
+ err |= ffurl_close(nodes[i].uc);
av_freep(&data->nodes);
av_freep(&h->priv_data);
@@ -100,12 +101,12 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
uri += len + strspn(uri+len, AV_CAT_SEPARATOR);
/* creating URLContext */
- if ((err = url_open(&uc, node_uri, flags)) < 0)
+ if ((err = ffurl_open(&uc, node_uri, flags)) < 0)
break;
/* creating size */
- if ((size = url_filesize(uc)) < 0) {
- url_close(uc);
+ if ((size = ffurl_size(uc)) < 0) {
+ ffurl_close(uc);
err = AVERROR(ENOSYS);
break;
}
@@ -135,12 +136,12 @@ static int concat_read(URLContext *h, unsigned char *buf, int size)
size_t i = data->current;
while (size > 0) {
- result = url_read(nodes[i].uc, buf, size);
+ result = ffurl_read(nodes[i].uc, buf, size);
if (result < 0)
return total ? total : result;
if (!result)
if (i + 1 == data->length ||
- url_seek(nodes[++i].uc, 0, SEEK_SET) < 0)
+ ffurl_seek(nodes[++i].uc, 0, SEEK_SET) < 0)
break;
total += result;
buf += result;
@@ -168,7 +169,7 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
/* get the absolute position */
for (i = 0; i != data->current; i++)
pos += nodes[i].size;
- pos += url_seek(nodes[i].uc, 0, SEEK_CUR);
+ pos += ffurl_seek(nodes[i].uc, 0, SEEK_CUR);
whence = SEEK_SET;
/* fall through with the absolute position */
case SEEK_SET:
@@ -179,7 +180,7 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
return AVERROR(EINVAL);
}
- result = url_seek(nodes[i].uc, pos, whence);
+ result = ffurl_seek(nodes[i].uc, pos, whence);
if (result >= 0) {
data->current = i;
while (i)
OpenPOWER on IntegriCloud