changeset 423:ed6098c4216a libavcodec

Add an av_abort macro that aborts, but also prints out the location of the abort. Helps track down bugs.
author philipjsg
date Fri, 24 May 2002 01:16:08 +0000
parents aa4a1c6209bd
children 92b8e1affb66
files common.h
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Thu May 23 16:19:07 2002 +0000
+++ b/common.h	Fri May 24 01:16:08 2002 +0000
@@ -150,6 +150,8 @@
 
 #endif /* HAVE_AV_CONFIG_H */
 
+#define av_abort()      do { fprintf(stderr, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
+
 /* assume b>0 */
 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
 #define ABS(a) ((a) >= 0 ? (a) : (-(a)))