[FFmpeg-devel] [PATCH] libavfilter: guard against ff_draw_init/ff_draw_init2 failures

Michael Niedermayer michael at niedermayer.cc
Sat Mar 8 02:27:56 EET 2025


On Tue, Mar 04, 2025 at 10:17:25AM -0800, Nil Fons Miret via ffmpeg-devel wrote:
> I'm not sure I understand what documentation you'd like to add. The
> behavior of ff_draw_init* is documented in drawutils.h, would you like
> me to add a comment where these functions are called with no risk of
> failing (as far as I can see, only qrencode.c)? My worry is that such
> a comment can easily become outdated. In any case, once I understand
> your request I'm happy to add any more documentation.

yes, if you add a check that is unreachable and that is intentional
it should receive a comment.
Otherwise it can confuse the reader, also it can be removed when someone
realizes it is unreachable

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Nations do behave wisely once they have exhausted all other alternatives. 
-- Abba Eban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250308/ee298961/attachment.sig>


More information about the ffmpeg-devel mailing list