mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-11 02:17:47 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user