Do not leave positive values undefined when negative are defined as error
Define positive return values as non errors and leave further meaning undefined This allows future extensions to use these values Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -72,7 +72,7 @@ AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type,
|
||||
*
|
||||
* @param frame an already allocated AVFrame
|
||||
* @param samplesref an audio buffer reference
|
||||
* @return 0 in case of success, a negative AVERROR code in case of
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
||||
*
|
||||
* @param frame an already allocated AVFrame
|
||||
* @param picref a video buffer reference
|
||||
* @return 0 in case of success, a negative AVERROR code in case of
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
||||
*
|
||||
* @param frame an already allocated AVFrame
|
||||
* @param ref a video or audio buffer reference
|
||||
* @return 0 in case of success, a negative AVERROR code in case of
|
||||
* @return >= 0 in case of success, a negative AVERROR code in case of
|
||||
* failure
|
||||
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||
*/
|
||||
|
@@ -1316,7 +1316,7 @@ enum {
|
||||
*
|
||||
* @param graphctx the filter graph
|
||||
* @param log_ctx context used for logging
|
||||
* @return 0 in case of success, a negative AVERROR code otherwise
|
||||
* @return >= 0 in case of success, a negative AVERROR code otherwise
|
||||
*/
|
||||
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);
|
||||
|
||||
|
@@ -224,7 +224,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
* A graph is considered valid if all its input and output pads are
|
||||
* connected.
|
||||
*
|
||||
* @return 0 in case of success, a negative value otherwise
|
||||
* @return >= 0 in case of success, a negative value otherwise
|
||||
*/
|
||||
static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
{
|
||||
@@ -262,7 +262,7 @@ static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
/**
|
||||
* Configure all the links of graphctx.
|
||||
*
|
||||
* @return 0 in case of success, a negative value otherwise
|
||||
* @return >= 0 in case of success, a negative value otherwise
|
||||
*/
|
||||
static int graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
{
|
||||
|
@@ -89,7 +89,7 @@ static char *parse_link_name(const char **buf, void *log_ctx)
|
||||
* @param filt_name the name of the filter to create
|
||||
* @param args the arguments provided to the filter during its initialization
|
||||
* @param log_ctx the log context to use
|
||||
* @return 0 in case of success, a negative AVERROR code otherwise
|
||||
* @return >= 0 in case of success, a negative AVERROR code otherwise
|
||||
*/
|
||||
static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index,
|
||||
const char *filt_name, const char *args, void *log_ctx)
|
||||
@@ -152,7 +152,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
|
||||
* @param index an index which is assigned to the created filter
|
||||
* instance, and which is supposed to be unique for each filter
|
||||
* instance added to the filtergraph
|
||||
* @return 0 in case of success, a negative AVERROR code otherwise
|
||||
* @return >= 0 in case of success, a negative AVERROR code otherwise
|
||||
*/
|
||||
static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph,
|
||||
int index, void *log_ctx)
|
||||
|
@@ -169,7 +169,7 @@ int ff_fmt_is_in(int fmt, const int *fmts);
|
||||
* @param ret pixel format pointer to where the value should be written
|
||||
* @param arg string to parse
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative AVERROR code on error
|
||||
* @return >= 0 in case of success, a negative AVERROR code on error
|
||||
*/
|
||||
int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx);
|
||||
|
||||
@@ -179,7 +179,7 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct
|
||||
* @param ret unsigned integer pointer to where the value should be written
|
||||
* @param arg string to parse
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative AVERROR code on error
|
||||
* @return >= 0 in case of success, a negative AVERROR code on error
|
||||
*/
|
||||
int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx);
|
||||
|
||||
@@ -189,7 +189,7 @@ int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx);
|
||||
* @param ret unsigned AVRational pointer to where the value should be written
|
||||
* @param arg string to parse
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative AVERROR code on error
|
||||
* @return >= 0 in case of success, a negative AVERROR code on error
|
||||
*/
|
||||
int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx);
|
||||
|
||||
@@ -199,7 +199,7 @@ int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx);
|
||||
* @param ret integer pointer to where the value should be written
|
||||
* @param arg string to parse
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative AVERROR code on error
|
||||
* @return >= 0 in case of success, a negative AVERROR code on error
|
||||
*/
|
||||
int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx);
|
||||
|
||||
@@ -209,7 +209,7 @@ int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx);
|
||||
* @param ret 64bit integer pointer to where the value should be written.
|
||||
* @param arg string to parse
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative AVERROR code on error
|
||||
* @return >= 0 in case of success, a negative AVERROR code on error
|
||||
*/
|
||||
int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx);
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
* @param pix_fmt pointer to the pixel format of the loaded image
|
||||
* @param filename the name of the image file to load
|
||||
* @param log_ctx log context
|
||||
* @return 0 in case of success, a negative error code otherwise.
|
||||
* @return >= 0 in case of success, a negative error code otherwise.
|
||||
*/
|
||||
int ff_load_image(uint8_t *data[4], int linesize[4],
|
||||
int *w, int *h, enum AVPixelFormat *pix_fmt,
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
#define LIBAVFILTER_VERSION_MAJOR 3
|
||||
#define LIBAVFILTER_VERSION_MINOR 88
|
||||
#define LIBAVFILTER_VERSION_MICRO 101
|
||||
#define LIBAVFILTER_VERSION_MICRO 102
|
||||
|
||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||
LIBAVFILTER_VERSION_MINOR, \
|
||||
|
Reference in New Issue
Block a user