Browse Source

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
tags/v0.5
Philip Gladstone 23 years ago
parent
commit
935cdf0902
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/common.h

+ 2
- 0
libavcodec/common.h View File

@@ -150,6 +150,8 @@ inline void dprintf(const char* fmt,...) {}


#endif /* HAVE_AV_CONFIG_H */ #endif /* HAVE_AV_CONFIG_H */


#define av_abort() do { fprintf(stderr, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)

/* assume b>0 */ /* assume b>0 */
#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
#define ABS(a) ((a) >= 0 ? (a) : (-(a))) #define ABS(a) ((a) >= 0 ? (a) : (-(a)))


Loading…
Cancel
Save