[FFmpeg-devel] [PATCH v2] fftools/ffmpeg_mux: fix reporting muxer EOF as error
Nicolas George
george at nsup.org
Tue Apr 25 17:37:26 EEST 2023
Anton Khirnov (12023-04-24):
> I think the point on which we disagree is your notion of "error
> conditions" as being basically interchangeable.
The way everything, FFmpeg and all other sane system work, is that the
caller handles the very few errors it know how to handle (EAGAIN
certainly, maybe a few other depending on the situation), and everything
else is passed to the user in human-readable form, in the hope the user
can deal with it.
So in a sence, most errors are basically interchangeable for the
application, and it is how it is supposed to be. For example EISDIR,
ENOENT, ENOTDIR are almost always interchangeable for the application,
and really mean to the user “you mistyped the file name somehow”.
> In both of these cases the CLI code as it is now is correct.
Absolutely not. The documentation states that muxers return errors and
nothing else, there is no special case for EOF, unlike demuxers, and
therefore this patch is a waste of code.
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230425/d5820c31/attachment.sig>
More information about the ffmpeg-devel
mailing list