]> git.sesse.net Git - ffmpeg/commitdiff
Add an av_abort macro that aborts, but also prints out the location of the abort.
authorPhilip Gladstone <philipjsg@users.sourceforge.net>
Fri, 24 May 2002 01:16:08 +0000 (01:16 +0000)
committerPhilip Gladstone <philipjsg@users.sourceforge.net>
Fri, 24 May 2002 01:16:08 +0000 (01:16 +0000)
Helps track down bugs.

Originally committed as revision 576 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/common.h

index 13018975c6dc295c9ae4f36c90500165bd847ce8..cc56064c9fe9e956d4de0c3180dc891bdbc32fe2 100644 (file)
@@ -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)))