diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-01 21:49:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-01 21:49:09 +0000 |
commit | 8e287af090d0ef65043f3b30573ead754375ff8f (patch) | |
tree | 9dbf6079fc3ef4287edce6436643ed6e2317f6dd /libavformat/aviobuf.c | |
parent | ecec87afc6f14794c7062ee4e83d05c6da1fd944 (diff) | |
download | ffmpeg-streaming-8e287af090d0ef65043f3b30573ead754375ff8f.zip ffmpeg-streaming-8e287af090d0ef65043f3b30573ead754375ff8f.tar.gz |
seekless filesize retrieving support in 7 lines of code, also doesnt break compatibility
Originally committed as revision 7395 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index f3e7d50..450b4cf 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -170,8 +170,11 @@ offset_t url_fsize(ByteIOContext *s) if (!s->seek) return -EPIPE; + size = s->seek(s->opaque, 0, AVSEEK_SIZE); + if(size<0){ size = s->seek(s->opaque, -1, SEEK_END) + 1; s->seek(s->opaque, s->pos, SEEK_SET); + } return size; } |