Le primidi 21 brumaire, an CCXXIII, Lukasz Marek a écrit : > I dont agree. Assert cannot be placed. Return value is not checked > is set_defaults so errors are ignored. It can just leave invalid > value. Assert here would terminate an application. In general I > think it is not regular case - i doub't there is any option with > invalid default - but all the best we can do is to compare set > value with the default, not validate the default
If a default value hardcoded in FFmpeg's options table has an invalid default, that is a BUG in FFmpeg, a bug that needs fixing immediately; but fortunately a bug that is easy to fix. That is exactly what asserts are for: detect easy bugs as early as possible and get them fixed immediately. It would be different if the value came from outside or if the call could fail for external reasons (ENOMEM for example), but that is not the case here. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel