[FFmpeg-devel] Revert non-blocking protocol
Ronald S. Bultje
Sat Mar 12 13:25:57 CET 2011
On Sat, Mar 12, 2011 at 4:51 AM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Le primidi 21 vent?se, an CCXIX, Ronald S. Bultje a ?crit?:
>> >> As I stated I'd rather have that fixed/discussed, I'm having strange
>> >> issues doing strange stuff (sctp isn't exactly common) and Apparently
>> >> reverting those fixed that part.
>> > Does ffplay mms://... work, as per issue 2657? Does pressing "q" in
>> > ffmpeg work with local and remote files? Right now it doesn't.
>> And issue2659 also. I expect several of the next 10 to be the same bug.
> I think I understand the bug.
> There was a design problem before I started tinkering with the code:
> url_interrupt_cb provoked the return of the EINTR error code, which is
> completely at odds with its usual Unix semantic.
> The usual Unix semantic of EINTR is that you want to ignore it. One of the
> things that "3ce3b49 Non-blocking protocol: core wrapper functions"
> introduced was to ignore it systematically.
> Unfortunately, while this is correct when EINTR comes from Unix, this is
> wrong when EINTR comes from a nested protocol.
> The obvious solution seems to be to fix the design problem:
> ? ? ? ? if (url_interrupt_cb())
> - ? ? ? ? ? ?return AVERROR(EINTR);
> + ? ? ? ? ? ?return AV_ERROR_INTERRUPTED;
> (and of course the corresponding change on other wrong uses of EINTR).
> If you agree on the principle, I shall start to implement it as soon as
It's fine with me as long as it solves the bug. Having ffmpeg or
ffplay hang is under no circumstances ever acceptable.
More information about the ffmpeg-devel