On Tue, Jul 16, 2024 at 12:13:10PM +0100, Andrew Sayers wrote: > AVERROR messages should always be less than zero, > and are usually based on three or four ASCII characters. > > For error codes that aren't explicitly handled by error.c (e.g. FFERROR_REDO), > print the ASCII code so the user has a little more information. > > If a non-negative number somehow gets passed to this function, > print a message saying this shouldn't happen. [...]
> + } else if (errnum >= 0) {
> + snprintf(errbuf, errbuf_size, "Impossible: non-negative error number
> %d occurred, please report this bug", errnum);
> } else {
> #if HAVE_STRERROR_R
> ret = AVERROR(strerror_r(AVUNERROR(errnum), errbuf, errbuf_size));
> @@ -126,7 +160,7 @@ int av_strerror(int errnum, char *errbuf, size_t
> errbuf_size)
> ret = -1;
> #endif
> if (ret < 0)
> - snprintf(errbuf, errbuf_size, "Error number %d occurred",
> errnum);
> + snprintf(errbuf, errbuf_size, "Error number -0x%X occurred,
> please report this bug", -errnum);
> }
I think this (asking for a report and pointing out to the user that
this isnt supposed to happen), is a good idea
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
