[FFmpeg-devel] Behaviour of url_read_complete
Reimar Döffinger
Reimar.Doeffinger
Fri Jan 22 21:14:36 CET 2010
On Fri, Jan 22, 2010 at 07:33:23PM +0100, Reimar D?ffinger wrote:
> Hello,
> I am a bit unsure about the purpose of url_read_complete.
> However I would find it more convenient if its behaviour was as
> with patch below.
> What are your opinions?
> The users of it in FFmpeg I saw would still work with that change.
> Index: avio.c
> ===================================================================
> --- avio.c (revision 21107)
> +++ avio.c (working copy)
> @@ -156,8 +156,8 @@
> len = 0;
> while (len < size) {
> ret = url_read(h, buf+len, size-len);
> - if (ret < 1)
> - return ret;
> + if (ret < 1 && ret != AVERROR(EAGAIN))
> + return ret < 0 ? ret : len;
> len += ret;
> }
The EAGAIN handling is obviously wrong, but I hope you get the idea I had in mind.
More information about the ffmpeg-devel
mailing list