Libav
Macros
avassert.h File Reference

simple assert() macros that are a bit more flexible than ISO C assert(). More...

#include <stdlib.h>
#include "avutil.h"
#include "log.h"

Go to the source code of this file.

Macros

#define av_assert0(cond)
 assert() equivalent, that is always enabled. More...
 
#define av_assert1(cond)   ((void)0)
 assert() equivalent, that does not lie in speed critical code. More...
 
#define av_assert2(cond)   ((void)0)
 assert() equivalent, that does lie in speed critical code. More...
 

Detailed Description

simple assert() macros that are a bit more flexible than ISO C assert().

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file avassert.h.

Macro Definition Documentation

#define av_assert0 (   cond)
Value:
do { \
if (!(cond)) { \
av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", \
AV_STRINGIFY(cond), __FILE__, __LINE__); \
abort(); \
} \
} while (0)
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:169
if(ac->has_optimized_func)
NULL
Definition: eval.c:55
#define AV_STRINGIFY(s)
Definition: macros.h:36
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
Definition: log.h:117

assert() equivalent, that is always enabled.

Definition at line 37 of file avassert.h.

Referenced by alloc_picture(), ape_decode_frame(), asf_parse_packet(), asf_read_pts(), av_grow_packet(), avcodec_default_reget_buffer(), avcodec_encode_video2(), avcodec_get_context_defaults3(), buffer_offset(), build_canonical_huff(), check_stream_specifier(), configure_input_filter(), configure_output_filter(), copy_picture_field(), decode_init(), decode_wmv9(), dummy_destruct_packet(), dxva2_get_buffer(), encode_slice_header(), ff_alsa_extend_reorder_buf(), ff_h264_ref_picture(), ff_mpeg_ref_picture(), ff_reget_buffer(), ffv1_encode_frame(), ffv1_encode_init(), filter_frame(), filter_frame_main(), filter_frame_overlay(), frame_list_add_frame(), frame_list_remove_samples(), get_available_samples(), init_input_filter(), is16BPS(), is9_OR_10BPS(), isALPHA(), isBE(), isPacked(), isPackedRGB(), isPlanar(), isPlanarRGB(), isPlanarYUV(), isRGB(), isYUV(), mmap_read_frame(), mp3_write_xing(), mp_decode_frame(), mss2_decode_frame(), poll_filter(), read_from_packet_buffer(), read_header(), release_delayed_buffers(), request_frame(), request_samples(), swap_channel_layouts_on_filter(), swap_sample_fmts_on_filter(), transcode_init(), update_frame_pool(), usePal(), vdpau_get_buffer(), vp78_decode_frame(), and write_header().

#define av_assert1 (   cond)    ((void)0)

assert() equivalent, that does not lie in speed critical code.

These asserts() thus can be enabled without fearing speedloss.

Definition at line 53 of file avassert.h.

Referenced by decode_slice(), and validate_options().

#define av_assert2 (   cond)    ((void)0)