[FFmpeg-devel] [PATCH 1/4] lavu: add av_x_if_null().
Clément Bœsch
ubitux at gmail.com
Sun Sep 18 17:11:35 CEST 2011
On Fri, Sep 16, 2011 at 01:38:50PM +0200, Stefano Sabatini wrote:
> On date Friday 2011-09-16 12:57:48 +0200, Clément Bœsch encoded:
> > ---
> > doc/APIchanges | 3 +++
> > libavutil/avutil.h | 10 +++++++++-
> > 2 files changed, 12 insertions(+), 1 deletions(-)
> >
> > diff --git a/doc/APIchanges b/doc/APIchanges
> > index b97df1f..96d5453 100644
> > --- a/doc/APIchanges
> > +++ b/doc/APIchanges
> > @@ -13,6 +13,9 @@ libavutil: 2011-04-18
> >
> > API changes, most recent first:
> >
> > +2011-09-xx - xxxxxxx - lavu 51.17.0
> > + Add av_x_if_null().
> > +
> > 2011-09-16 - xxxxxxx - lavfi 2.42.0
> > Add avfilter_all_channel_layouts.
> >
> > diff --git a/libavutil/avutil.h b/libavutil/avutil.h
> > index ef7a145..3d46365 100644
> > --- a/libavutil/avutil.h
> > +++ b/libavutil/avutil.h
> > @@ -40,7 +40,7 @@
> > #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_MINOR 17
> > #define LIBAVUTIL_VERSION_MICRO 0
> >
> > #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
> > @@ -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;
> > +}
> > +
>
> Should be fine, maybe av_get_x_if_null() for keeping a verb in the
> function name, or a better/shorter name if you can find one,
> suggestions are welcome.
>
> In each case, leave two/three days to the other developers for
> commenting before the commit.
I'll push tomorrow along with the rest of the patchset if no objection.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110918/912ffc4e/attachment.asc>
More information about the ffmpeg-devel
mailing list