mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avutil: av_x_if_null: remove const for the return value.
This is the usual weirdness with const/non-const pointers through a function. See the prototype of strchr for a standard example. The function had to be moved down, below the point where stdint.h is indirectly included. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
730945d941
commit
757cb3b46a
@ -324,14 +324,6 @@ 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 "common.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "mathematics.h"
|
#include "mathematics.h"
|
||||||
@ -340,6 +332,14 @@ static inline const void *av_x_if_null(const void *p, const void *x)
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "pixfmt.h"
|
#include "pixfmt.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return x default pointer in case p is NULL.
|
||||||
|
*/
|
||||||
|
static inline void *av_x_if_null(const void *p, const void *x)
|
||||||
|
{
|
||||||
|
return (void *)(intptr_t)(p ? p : x);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
* @}
|
* @}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user