[FFmpeg-cvslog] lavu: add av_x_if_null().

Clément Bœsch git at videolan.org
Thu Sep 22 00:42:03 CEST 2011


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Sep 16 12:52:45 2011 +0200| [a70e787410b1700a379f34c9459820048a3c1603] | committer: Clément Bœsch

lavu: add av_x_if_null().

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a70e787410b1700a379f34c9459820048a3c1603
---

 doc/APIchanges     |    3 +++
 libavutil/avutil.h |   12 ++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 0e15303..ea0e766 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:   2011-04-18
 
 API changes, most recent first:
 
+2011-09-22 - xxxxxxx - lavu 51.17.0
+  Add av_x_if_null().
+
 2011-09-18 - xxxxxxx - lavc 53.16.0
   Add showall flag2
 
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 9282e5b..3d46365 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -40,8 +40,8 @@
 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
 
 #define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 16
-#define LIBAVUTIL_VERSION_MICRO  1
+#define LIBAVUTIL_VERSION_MINOR 17
+#define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \
@@ -135,6 +135,14 @@ enum AVPictureType {
  */
 char av_get_picture_type_char(enum AVPictureType pict_type);
 
+/**
+ * Return x default pointer in case p is NULL.
+ */
+static inline const void *av_x_if_null(const void *p, const void *x)
+{
+    return p ? p : x;
+}
+
 #include "common.h"
 #include "error.h"
 #include "mathematics.h"



More information about the ffmpeg-cvslog mailing list