[FFmpeg-devel] [PATCH] Adding av_abort() : adding custom handlers for abort().
Nicolas George
george at nsup.org
Wed Jul 27 21:40:39 EEST 2022
Julien Vary (12022-07-27):
> >Or maybe we could add av_abort() as an alias to av_assert0(0), which
> >eventually just calls abort()...
>
> I agree that if the goal is to bail-out on 'should-not-be-reachable'
> code, something that alias av_assert0(0) seems a great idea.
> Shall we then give a more descriptive name than plain "av_abort()" for those situations?
>
> Nicolas George & Hendrik Leppkes ? Your thoughts ?
I like “av_assert0(!"reason");” better than a blanket 0.
It can be a good habit to take from now on, but I do not think it is
worth changing the whole code.
av_assert0() calls av_log(), which can call user callbacks or allocate
memory: for dangerous cases, a real immediate abort() is still better.
Regards,
--
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/20220727/e666c376/attachment.sig>
More information about the ffmpeg-devel
mailing list