diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:24:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:31:56 +0200 |
commit | 434f248723d4d3e22545c3542ef9fc7c00b2379b (patch) | |
tree | 4c399c1fa89215676e14f57c84a3244af806c39e /libavformat/concat.c | |
parent | 6114bffa91714c83a533ae7e5a597ee605d35c3d (diff) | |
parent | 2310ee4b1cca48609d06774b7c3c70a5f38f3473 (diff) | |
download | ffmpeg-434f248723d4d3e22545c3542ef9fc7c00b2379b.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
ac3enc: move extract_exponents inner loop to ac3dsp
avio: deprecate url_get_filename().
avio: deprecate url_max_packet_size().
avio: make url_get_file_handle() internal.
avio: make url_filesize() internal.
avio: make url_close() internal.
avio: make url_seek() internal.
avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
avio: make url_write() internal.
avio: make url_read_complete() internal.
avio: make url_read() internal.
avio: make url_open() internal.
avio: make url_connect internal.
avio: make url_alloc internal.
applehttp: Merge two for loops
applehttp: Restructure the demuxer to use a custom AVIOContext
applehttp: Move finished and target_duration to the variant struct
aacenc: reduce the number of loop index variables
avio: deprecate url_open_protocol
avio: deprecate url_poll and URLPollEntry
...
Conflicts:
libavformat/applehttp.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/concat.c')
-rw-r--r-- | libavformat/concat.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libavformat/concat.c b/libavformat/concat.c index 365907912a..c066826bb8 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) |