[FFmpeg-devel] [PATCH] av_assert should you AV_LOG_PANIC.

Clément Bœsch ubitux at gmail.com
Mon Dec 3 21:52:32 CET 2012


On Mon, Dec 03, 2012 at 08:43:48PM +0100, Reimar Döffinger wrote:
> The description of AV_LOG_PANIC 100% matches what av_assert
> does, while AV_LOG_FATAL does not really.
> So I think it makes sense to replace it.
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
>  libavutil/avassert.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/avassert.h b/libavutil/avassert.h
> index e100d0b..41f5e0e 100644
> --- a/libavutil/avassert.h
> +++ b/libavutil/avassert.h
> @@ -36,7 +36,7 @@
>   */
>  #define av_assert0(cond) do {                                           \
>      if (!(cond)) {                                                      \
> -        av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n",    \
> +        av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n",    \
>                 AV_STRINGIFY(cond), __FILE__, __LINE__);                 \
>          abort();                                                        \
>      }                                                                   \

Maybe micro bump in case someone was relying on fatal logging only to
trigger them.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121203/8d25d3e2/attachment.asc>


More information about the ffmpeg-devel mailing list