diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2005-05-19 00:06:27 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2005-05-19 00:06:27 +0000 |
commit | a965c478b2b2fe7d9d0a2c60561bb4ee171a2119 (patch) | |
tree | 92bd415fe4020d93d262d7a120ec0b00823cb3b3 /libavformat/aviobuf.c | |
parent | 3b5ffe7a399a8ff8a600a31ba9b4348e5d2e8b86 (diff) | |
download | ffmpeg-streaming-a965c478b2b2fe7d9d0a2c60561bb4ee171a2119.zip ffmpeg-streaming-a965c478b2b2fe7d9d0a2c60561bb4ee171a2119.tar.gz |
drop most url_fileno() calls (allows to use ByteIOContext directly in caller apps instead of URLProtocol)
Originally committed as revision 4275 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 6eab0e1..993ba44 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -172,6 +172,17 @@ offset_t url_ftell(ByteIOContext *s) return url_fseek(s, 0, SEEK_CUR); } +offset_t url_fsize(ByteIOContext *s) +{ + offset_t size; + + if (!s->seek) + return -EPIPE; + size = s->seek(s->opaque, -1, SEEK_END) + 1; + s->seek(s->opaque, s->pos, SEEK_SET); + return size; +} + int url_feof(ByteIOContext *s) { return s->eof_reached; |