[FFmpeg-devel] [RFC] av_assert

Alex Beregszaszi alex
Thu May 17 22:14:46 CEST 2007


Hi,

as we av_abort, and we are using assert not only for debug, I propose to
have an own av_assert macro. A pro is that now it uses av_log, thus in
some applications the error doesn't gets along unnoticed (as it could
happen with fprintf), think about a GUI based application.

The attached patch adds the macro, but doesn't changes the assert()'s to
av_assert() in the code.

The output is slightly different:

assert():
aes: aes.c:212: main: Assertion `rct[0][0] == 0x3' failed.
Aborted

av_assert():
Assertion 'rct[0][0] == 0x3' failed in main at aes.c:212
Aborted

--
Alex Beregszaszi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: av_assert.diff
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070517/e30e6de9/attachment.bin>



More information about the ffmpeg-devel mailing list