Hi Martin, not sure if the ping was to me or to Ronald, anyway... On Mon, 2010-03-22 at 20:56 +0200, Martin Storsj? wrote: [...]
On Fri, 5 Mar 2010, Luca Abeni wrote:
I think the idea was to let the application cope with EINTR and EAGAIN, but I might be misremembering (and I have no strong opinions on it :)
Yes, assuming that all the code (between the lowest level protocol receiving the data and the original av_read_frame call from the user application) is ready to handle EINTR/EAGAIN properly, that's probably the best solution.
One problem is that a very large portion of the code don't pass the original error codes through properly but simply return AVERROR(EIO) if something occurred.
I think this part should be fixed. I mean, the code should pass the original error, not change it in EIO...
Another problem is that code reading a few bytes at a time seldom is ready to actually be interrupted at any time, return an error code and then continue properly when called the next time again. [...]
Ok; I did not consider this... If returning EINTR is not possible without breaking many demuxers, then I think your patch is a good idea (maybe with a comment explaining why EINTR is not passed to the caller... When all the demuxers will be fixed, we could remove this hack). Just an opinion... Thanks, Luca