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
This commit is contained in:
Aurelien Jacobs
2005-05-19 00:06:27 +00:00
parent 3b5ffe7a39
commit a965c478b2
11 changed files with 26 additions and 16 deletions

View File

@ -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;