Make url_fsize() return AVERROR(ENOSYS) rather than AVERROR(EPIPE) if

the seek operation is not defined in the ByteIOContext.

Originally committed as revision 22902 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2010-04-18 17:37:21 +00:00
parent 28894105c8
commit 4c4ef3db4b
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ int64_t url_fsize(ByteIOContext *s)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if (!s->seek) if (!s->seek)
return AVERROR(EPIPE); return AVERROR(ENOSYS);
size = s->seek(s->opaque, 0, AVSEEK_SIZE); size = s->seek(s->opaque, 0, AVSEEK_SIZE);
if(size<0){ if(size<0){
if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0) if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)