[FFmpeg-devel] [PATCH 1/3] lavu/error: add AVERROR_REDO.
george at nsup.org
Fri Nov 27 00:19:08 CET 2015
Le sextidi 6 frimaire, an CCXXIV, Marton Balint a écrit :
> Maybe I am missing something, but the existing error AVERROR(EINTR) cannot
> be used for this?
It would be less broken than EAGAIN, since it is almost always treated like
that by Unix code.
But without the loop in utils.c (patch 2/3 in this series), the result is as
bad or worse than EAGAIN, since the application sees it as an error code.
And this is this loop that wm4 and Ronald are bikeshedding.
But in principle, I am quite against reusing codes like that. The error
message for EINTR is "Interrupted function" or more frequently "Interrupted
system call", and nothing was interrupted, especially not a system call. The
bug in the FLV demuxer at the origin of this threads was precisely caused
because EAGAIN was reused for a slightly different semantic.
(As a side note, it seems that EINTR is already abused in a completely
different way by the MPEG-TS demuxer; so much for the fabled review
On the other hand, I can see a point for making this error code MORE
specific, for example AVERROR_DATA_DISCARDED "Data was discarded".
Also, a specific error code is the only way of providing applications the
fine-grained control that Michael suggested.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel