appropriate if it couldn't read any data at all.
This should make handling of EOF and error simpler or make it work right without
extra code in a few place (e.g. raw demuxer).
Originally committed as revision 20135 to svn://svn.ffmpeg.org/ffmpeg/trunk
size -= len;
}
}
+ if (size1 == size) {
+ if (url_ferror(s)) return url_ferror(s);
+ if (url_feof(s)) return AVERROR_EOF;
+ }
return size1 - size;
}
len = size;
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
+ if (!len) {
+ if (url_ferror(s)) return url_ferror(s);
+ if (url_feof(s)) return AVERROR_EOF;
+ }
return len;
}