Define positive return values as non errors and leave further meaning undefined This allows future extensions to use these values
Unified · Split
| @@ -498,7 +498,7 @@ int read_yesno(void); · 497 unmodified lines | ||
| 498 | 498 | * @param filename file to read from |
| 499 | 499 | * @param bufptr location where pointer to buffer is returned |
| 500 | 500 | * @param size location where size of buffer is returned |
| 501 | − * @return 0 in case of success, a negative value corresponding to an | |
| 501 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 502 | 502 | * AVERROR error code in case of failure. |
| 503 | 503 | */ |
| 504 | 504 | int cmdutils_read_file(const char *filename, char **bufptr, size_t *size); |
| @@ -184,7 +184,7 @@ static int cmap_read_palette(AVCodecContext *avctx, uint32_t *pal) · 183 unmodified lines | ||
| 184 | 184 | * |
| 185 | 185 | * @param avctx the AVCodecContext where to extract extra context to |
| 186 | 186 | * @param avpkt the AVPacket to extract extra context from or NULL to use avctx |
| 187 | − * @return 0 in case of success, a negative error code otherwise | |
| 187 | + * @return >= 0 in case of success, a negative error code otherwise | |
| 188 | 188 | */ |
| 189 | 189 | static int extract_header(AVCodecContext *const avctx, |
| 190 | 190 | const AVPacket *const avpkt) { |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | #define LIBAVCODEC_VERSION_MAJOR 55 |
| 32 | 32 | #define LIBAVCODEC_VERSION_MINOR 37 |
| 33 | −#define LIBAVCODEC_VERSION_MICRO 101 | |
| 33 | +#define LIBAVCODEC_VERSION_MICRO 102 | |
| 34 | 34 | |
| 35 | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 36 | 36 | LIBAVCODEC_VERSION_MINOR, \ |
| @@ -681,7 +681,7 @@ static void decode_decorrelation_matrix(WMAProDecodeCtx *s, · 680 unmodified lines | ||
| 681 | 681 | /** |
| 682 | 682 | *@brief Decode channel transformation parameters |
| 683 | 683 | *@param s codec context |
| 684 | − *@return 0 in case of success, < 0 in case of bitstream errors | |
| 684 | + *@return >= 0 in case of success, < 0 in case of bitstream errors | |
| 685 | 685 | */ |
| 686 | 686 | static int decode_channel_transform(WMAProDecodeCtx* s) |
| 687 | 687 | { |
| @@ -72,7 +72,7 @@ AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type, · 71 unmodified lines | ||
| 72 | 72 | * |
| 73 | 73 | * @param frame an already allocated AVFrame |
| 74 | 74 | * @param samplesref an audio buffer reference |
| 75 | − * @return 0 in case of success, a negative AVERROR code in case of | |
| 75 | + * @return >= 0 in case of success, a negative AVERROR code in case of | |
| 76 | 76 | * failure |
| 77 | 77 | * @deprecated Use avfilter_copy_buf_props() instead. |
| 78 | 78 | */ |
| @@ -85,7 +85,7 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame, · 6 unmodified lines | ||
| 85 | 85 | * |
| 86 | 86 | * @param frame an already allocated AVFrame |
| 87 | 87 | * @param picref a video buffer reference |
| 88 | − * @return 0 in case of success, a negative AVERROR code in case of | |
| 88 | + * @return >= 0 in case of success, a negative AVERROR code in case of | |
| 89 | 89 | * failure |
| 90 | 90 | * @deprecated Use avfilter_copy_buf_props() instead. |
| 91 | 91 | */ |
| @@ -98,7 +98,7 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, · 6 unmodified lines | ||
| 98 | 98 | * |
| 99 | 99 | * @param frame an already allocated AVFrame |
| 100 | 100 | * @param ref a video or audio buffer reference |
| 101 | − * @return 0 in case of success, a negative AVERROR code in case of | |
| 101 | + * @return >= 0 in case of success, a negative AVERROR code in case of | |
| 102 | 102 | * failure |
| 103 | 103 | * @deprecated Use avfilter_copy_buf_props() instead. |
| 104 | 104 | */ |
| @@ -1316,7 +1316,7 @@ enum { · 1315 unmodified lines | ||
| 1316 | 1316 | * |
| 1317 | 1317 | * @param graphctx the filter graph |
| 1318 | 1318 | * @param log_ctx context used for logging |
| 1319 | − * @return 0 in case of success, a negative AVERROR code otherwise | |
| 1319 | + * @return >= 0 in case of success, a negative AVERROR code otherwise | |
| 1320 | 1320 | */ |
| 1321 | 1321 | int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx); |
| 1322 | 1322 | |
| @@ -224,7 +224,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 223 unmodified lines | ||
| 224 | 224 | * A graph is considered valid if all its input and output pads are |
| 225 | 225 | * connected. |
| 226 | 226 | * |
| 227 | − * @return 0 in case of success, a negative value otherwise | |
| 227 | + * @return >= 0 in case of success, a negative value otherwise | |
| 228 | 228 | */ |
| 229 | 229 | static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) |
| 230 | 230 | { |
| @@ -262,7 +262,7 @@ static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) · 31 unmodified lines | ||
| 262 | 262 | /** |
| 263 | 263 | * Configure all the links of graphctx. |
| 264 | 264 | * |
| 265 | − * @return 0 in case of success, a negative value otherwise | |
| 265 | + * @return >= 0 in case of success, a negative value otherwise | |
| 266 | 266 | */ |
| 267 | 267 | static int graph_config_links(AVFilterGraph *graph, AVClass *log_ctx) |
| 268 | 268 | { |
| @@ -89,7 +89,7 @@ static char *parse_link_name(const char **buf, void *log_ctx) · 88 unmodified lines | ||
| 89 | 89 | * @param filt_name the name of the filter to create |
| 90 | 90 | * @param args the arguments provided to the filter during its initialization |
| 91 | 91 | * @param log_ctx the log context to use |
| 92 | − * @return 0 in case of success, a negative AVERROR code otherwise | |
| 92 | + * @return >= 0 in case of success, a negative AVERROR code otherwise | |
| 93 | 93 | */ |
| 94 | 94 | static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index, |
| 95 | 95 | 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 · 56 unmodified lines | ||
| 152 | 152 | * @param index an index which is assigned to the created filter |
| 153 | 153 | * instance, and which is supposed to be unique for each filter |
| 154 | 154 | * instance added to the filtergraph |
| 155 | − * @return 0 in case of success, a negative AVERROR code otherwise | |
| 155 | + * @return >= 0 in case of success, a negative AVERROR code otherwise | |
| 156 | 156 | */ |
| 157 | 157 | static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph, |
| 158 | 158 | int index, void *log_ctx) |
| @@ -169,7 +169,7 @@ int ff_fmt_is_in(int fmt, const int *fmts); · 168 unmodified lines | ||
| 169 | 169 | * @param ret pixel format pointer to where the value should be written |
| 170 | 170 | * @param arg string to parse |
| 171 | 171 | * @param log_ctx log context |
| 172 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 172 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 173 | 173 | */ |
| 174 | 174 | int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx); |
| 175 | 175 | |
| @@ -179,7 +179,7 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct · 3 unmodified lines | ||
| 179 | 179 | * @param ret unsigned integer pointer to where the value should be written |
| 180 | 180 | * @param arg string to parse |
| 181 | 181 | * @param log_ctx log context |
| 182 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 182 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 183 | 183 | */ |
| 184 | 184 | int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx); |
| 185 | 185 | |
| @@ -189,7 +189,7 @@ int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx); · 3 unmodified lines | ||
| 189 | 189 | * @param ret unsigned AVRational pointer to where the value should be written |
| 190 | 190 | * @param arg string to parse |
| 191 | 191 | * @param log_ctx log context |
| 192 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 192 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 193 | 193 | */ |
| 194 | 194 | int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx); |
| 195 | 195 | |
| @@ -199,7 +199,7 @@ int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx); · 3 unmodified lines | ||
| 199 | 199 | * @param ret integer pointer to where the value should be written |
| 200 | 200 | * @param arg string to parse |
| 201 | 201 | * @param log_ctx log context |
| 202 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 202 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 203 | 203 | */ |
| 204 | 204 | int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx); |
| 205 | 205 | |
| @@ -209,7 +209,7 @@ int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx); · 3 unmodified lines | ||
| 209 | 209 | * @param ret 64bit integer pointer to where the value should be written. |
| 210 | 210 | * @param arg string to parse |
| 211 | 211 | * @param log_ctx log context |
| 212 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 212 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 213 | 213 | */ |
| 214 | 214 | int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx); |
| 215 | 215 | |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | * @param pix_fmt pointer to the pixel format of the loaded image |
| 35 | 35 | * @param filename the name of the image file to load |
| 36 | 36 | * @param log_ctx log context |
| 37 | − * @return 0 in case of success, a negative error code otherwise. | |
| 37 | + * @return >= 0 in case of success, a negative error code otherwise. | |
| 38 | 38 | */ |
| 39 | 39 | int ff_load_image(uint8_t *data[4], int linesize[4], |
| 40 | 40 | int *w, int *h, enum AVPixelFormat *pix_fmt, |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | #define LIBAVFILTER_VERSION_MAJOR 3 |
| 33 | 33 | #define LIBAVFILTER_VERSION_MINOR 88 |
| 34 | −#define LIBAVFILTER_VERSION_MICRO 101 | |
| 34 | +#define LIBAVFILTER_VERSION_MICRO 102 | |
| 35 | 35 | |
| 36 | 36 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| 37 | 37 | LIBAVFILTER_VERSION_MINOR, \ |
| @@ -368,7 +368,7 @@ int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); · 367 unmodified lines | ||
| 368 | 368 | * In case of failure the pointed to value is set to NULL. |
| 369 | 369 | * @param flags flags which control how the resource indicated by url |
| 370 | 370 | * is to be opened |
| 371 | − * @return 0 in case of success, a negative value corresponding to an | |
| 371 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 372 | 372 | * AVERROR code in case of failure |
| 373 | 373 | */ |
| 374 | 374 | int avio_open(AVIOContext **s, const char *url, int flags); |
| @@ -387,7 +387,7 @@ int avio_open(AVIOContext **s, const char *url, int flags); · 12 unmodified lines | ||
| 387 | 387 | * @param options A dictionary filled with protocol-private options. On return |
| 388 | 388 | * this parameter will be destroyed and replaced with a dict containing options |
| 389 | 389 | * that were not found. May be NULL. |
| 390 | − * @return 0 in case of success, a negative value corresponding to an | |
| 390 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 391 | 391 | * AVERROR code in case of failure |
| 392 | 392 | */ |
| 393 | 393 | int avio_open2(AVIOContext **s, const char *url, int flags, |
| @@ -78,7 +78,7 @@ static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s) · 77 unmodified lines | ||
| 78 | 78 | * @param s The read-only AVIOContext to rewind |
| 79 | 79 | * @param buf The probe buffer containing the first buf_size bytes of the file |
| 80 | 80 | * @param buf_size The size of buf |
| 81 | − * @return 0 in case of success, a negative value corresponding to an | |
| 81 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 82 | 82 | * AVERROR code in case of failure |
| 83 | 83 | */ |
| 84 | 84 | int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char **buf, int buf_size); |
| @@ -125,7 +125,7 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); · 40 unmodified lines | ||
| 125 | 125 | * |
| 126 | 126 | * @param s Used to return the pointer to the created AVIOContext. |
| 127 | 127 | * In case of failure the pointed to value is set to NULL. |
| 128 | − * @return 0 in case of success, a negative value corresponding to an | |
| 128 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 129 | 129 | * AVERROR code in case of failure |
| 130 | 130 | */ |
| 131 | 131 | int ffio_fdopen(AVIOContext **s, URLContext *h); |
| @@ -101,7 +101,7 @@ typedef struct URLProtocol { · 100 unmodified lines | ||
| 101 | 101 | * is to be opened |
| 102 | 102 | * @param int_cb interrupt callback to use for the URLContext, may be |
| 103 | 103 | * NULL |
| 104 | − * @return 0 in case of success, a negative value corresponding to an | |
| 104 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 105 | 105 | * AVERROR code in case of failure |
| 106 | 106 | */ |
| 107 | 107 | int ffurl_alloc(URLContext **puc, const char *filename, int flags, |
| @@ -130,7 +130,7 @@ int ffurl_connect(URLContext *uc, AVDictionary **options); · 22 unmodified lines | ||
| 130 | 130 | * @param options A dictionary filled with protocol-private options. On return |
| 131 | 131 | * this parameter will be destroyed and replaced with a dict containing options |
| 132 | 132 | * that were not found. May be NULL. |
| 133 | − * @return 0 in case of success, a negative value corresponding to an | |
| 133 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 134 | 134 | * AVERROR code in case of failure |
| 135 | 135 | */ |
| 136 | 136 | int ffurl_open(URLContext **puc, const char *filename, int flags, |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | #define LIBAVFORMAT_VERSION_MAJOR 55 |
| 33 | 33 | #define LIBAVFORMAT_VERSION_MINOR 19 |
| 34 | −#define LIBAVFORMAT_VERSION_MICRO 102 | |
| 34 | +#define LIBAVFORMAT_VERSION_MICRO 103 | |
| 35 | 35 | |
| 36 | 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
| 37 | 37 | LIBAVFORMAT_VERSION_MINOR, \ |
| @@ -45,7 +45,7 @@ typedef struct AVExpr AVExpr; · 44 unmodified lines | ||
| 45 | 45 | * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments |
| 46 | 46 | * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2 |
| 47 | 47 | * @param log_ctx parent logging context |
| 48 | − * @return 0 in case of success, a negative value corresponding to an | |
| 48 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 49 | 49 | * AVERROR code otherwise |
| 50 | 50 | */ |
| 51 | 51 | int av_expr_parse_and_eval(double *res, const char *s, |
| @@ -68,7 +68,7 @@ int av_expr_parse_and_eval(double *res, const char *s, · 16 unmodified lines | ||
| 68 | 68 | * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers |
| 69 | 69 | * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments |
| 70 | 70 | * @param log_ctx parent logging context |
| 71 | − * @return 0 in case of success, a negative value corresponding to an | |
| 71 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 72 | 72 | * AVERROR code otherwise |
| 73 | 73 | */ |
| 74 | 74 | int av_expr_parse(AVExpr **expr, const char *s, |
| @@ -127,7 +127,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, · 126 unmodified lines | ||
| 127 | 127 | * @endcode |
| 128 | 128 | * @param duration flag which tells how to interpret timestr, if not |
| 129 | 129 | * zero timestr is interpreted as a duration, otherwise as a date |
| 130 | − * @return 0 in case of success, a negative value corresponding to an | |
| 130 | + * @return >= 0 in case of success, a negative value corresponding to an | |
| 131 | 131 | * AVERROR code otherwise |
| 132 | 132 | */ |
| 133 | 133 | int av_parse_time(int64_t *timeval, const char *timestr, int duration); |
| @@ -76,7 +76,7 @@ · 75 unmodified lines | ||
| 76 | 76 | |
| 77 | 77 | #define LIBAVUTIL_VERSION_MAJOR 52 |
| 78 | 78 | #define LIBAVUTIL_VERSION_MINOR 47 |
| 79 | −#define LIBAVUTIL_VERSION_MICRO 100 | |
| 79 | +#define LIBAVUTIL_VERSION_MICRO 101 | |
| 80 | 80 | |
| 81 | 81 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| 82 | 82 | LIBAVUTIL_VERSION_MINOR, \ |