Browse code

lavu: add av_x_if_null().

Clément Bœsch authored on 2011/09/16 19:52:45
Showing 2 changed files
... ...
@@ -13,6 +13,9 @@ libavutil:   2011-04-18
13 13
 
14 14
 API changes, most recent first:
15 15
 
16
+2011-09-22 - xxxxxxx - lavu 51.17.0
17
+  Add av_x_if_null().
18
+
16 19
 2011-09-18 - xxxxxxx - lavc 53.16.0
17 20
   Add showall flag2
18 21
 
... ...
@@ -40,8 +40,8 @@
40 40
 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
41 41
 
42 42
 #define LIBAVUTIL_VERSION_MAJOR 51
43
-#define LIBAVUTIL_VERSION_MINOR 16
44
-#define LIBAVUTIL_VERSION_MICRO  1
43
+#define LIBAVUTIL_VERSION_MINOR 17
44
+#define LIBAVUTIL_VERSION_MICRO  0
45 45
 
46 46
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
47 47
                                                LIBAVUTIL_VERSION_MINOR, \
... ...
@@ -135,6 +135,14 @@ enum AVPictureType {
135 135
  */
136 136
 char av_get_picture_type_char(enum AVPictureType pict_type);
137 137
 
138
+/**
139
+ * Return x default pointer in case p is NULL.
140
+ */
141
+static inline const void *av_x_if_null(const void *p, const void *x)
142
+{
143
+    return p ? p : x;
144
+}
145
+
138 146
 #include "common.h"
139 147
 #include "error.h"
140 148
 #include "mathematics.h"