[FFmpeg-devel] [PATCH] ffprobe: do not exit in case the demuxer returns AVERROR(EAGAIN)
andreas.cadhalpun at googlemail.com
Fri Nov 20 00:30:22 CET 2015
On 19.11.2015 02:36, Michael Niedermayer wrote:
> On Thu, Nov 19, 2015 at 01:25:53AM +0100, Andreas Cadhalpun wrote:
>> On 18.11.2015 15:07, Michael Niedermayer wrote:
>>> iam not aware of any inf loops with EAGAIN
>> Well, I am. I even sent patches fixing that, but you had objections. 
> FFM is used as a ring buffer between processes
> if you try to read a ffm file that is not connected to any process
> writing into it then that could wait via EAGAIN forever
> that is a problem
> A fix would require to extend the ffm format slightly i think
> a simple fix would be for the muxer to write teh current date in the
> file and the demuxer to skip EAGAIN and fail if the read data differs
> by more than a small amout from the current date or something similar
Wouldn't that be a backwards incompatible format change?
If so the problem would still persist for the old variant of the format.
> if you dont want to work on this, please say so, then ill look into
It's still somewhere on my TODO list, but somehow I've always found
something more important to do than figuring out how ffserver works
or how to best test this ring buffer functionality.
So I'd appreciate it, if you could look into this.
(I can send you a hanging sample, if you want.)
On 19.11.2015 03:02, Michael Niedermayer wrote:
> another even simpler idea would be to add a user option to switch the
> ring buffer behavior off/on that would solve the EAGAIN issue
> for randomly fed files into random applications too
> it would not help in the ring buffer case when the producer crashes
> or fails for other reasons
That would already be a huge improvement over the status quo.
It would be great if you could turn this idea into a patch. ;)
More information about the ffmpeg-devel