aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-24 01:16:08 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-24 01:16:08 +0000
commit935cdf090219949afe1465b3d6c5b8e8643df1a6 (patch)
treec7961c332e729f9a27d546e8f1bd24d095405e6d
parent52af45ad77a009e0c249eb60b6c8ea8b6ed4ef8a (diff)
downloadffmpeg-935cdf090219949afe1465b3d6c5b8e8643df1a6.tar.gz
Add an av_abort macro that aborts, but also prints out the location of the abort.
Helps track down bugs. Originally committed as revision 576 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 13018975c6..cc56064c9f 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -150,6 +150,8 @@ inline void dprintf(const char* fmt,...) {}
#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)))