[FFmpeg-devel] Revert non-blocking protocol

Nicolas George nicolas.george
Sat Mar 12 10:51:07 CET 2011


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
possible.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110312/e2288a50/attachment.pgp>



More information about the ffmpeg-devel mailing list