[FFmpeg-devel] [PATCH 1/2] swresample/swresample: add av_warn_unused_result
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Oct 29 03:59:41 CET 2015
On Thu, Oct 15, 2015 at 9:31 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> This will trigger a few warnings (e.g in avfilter) that need to be
> fixed.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libswresample/swresample.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/libswresample/swresample.h b/libswresample/swresample.h
> index 10eaebc..d21084f 100644
> --- a/libswresample/swresample.h
> +++ b/libswresample/swresample.h
> @@ -220,6 +220,7 @@ struct SwrContext *swr_alloc(void);
> * @param[in,out] s Swr context to initialize
> * @return AVERROR error code in case of failure.
> */
> +av_warn_unused_result
> int swr_init(struct SwrContext *s);
>
> /**
> @@ -307,6 +308,7 @@ void swr_close(struct SwrContext *s);
> *
> * @return number of samples output per channel, negative value on error
> */
> +av_warn_unused_result
> int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
> const uint8_t **in , int in_count);
>
> @@ -354,6 +356,7 @@ int64_t swr_next_pts(struct SwrContext *s, int64_t pts);
> * @li compensation unsupported by resampler, or
> * @li swr_init() fails when called.
> */
> +av_warn_unused_result
> int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance);
>
> /**
> @@ -364,6 +367,7 @@ int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensatio
> * indexes, -1 for a muted channel)
> * @return >= 0 on success, or AVERROR error code in case of failure.
> */
> +av_warn_unused_result
> int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
>
> /**
> @@ -375,6 +379,7 @@ int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
> * @param stride offset between lines of the matrix
> * @return >= 0 on success, or AVERROR error code in case of failure.
> */
> +av_warn_unused_result
> int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride);
>
> /**
> @@ -395,6 +400,7 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride);
> *
> * @return >= 0 on success, or a negative AVERROR code on failure
> */
> +av_warn_unused_result
> int swr_drop_output(struct SwrContext *s, int count);
>
> /**
> @@ -408,6 +414,7 @@ int swr_drop_output(struct SwrContext *s, int count);
> *
> * @return >= 0 on success, or a negative AVERROR code on failure
> */
> +av_warn_unused_result
> int swr_inject_silence(struct SwrContext *s, int count);
>
> /**
> @@ -526,6 +533,7 @@ const char *swresample_license(void);
> * @return 0 on success, AVERROR on failure or nonmatching
> * configuration.
> */
> +av_warn_unused_result
> int swr_convert_frame(SwrContext *swr,
> AVFrame *output, const AVFrame *input);
>
> @@ -543,6 +551,7 @@ int swr_convert_frame(SwrContext *swr,
> * @param input input AVFrame
> * @return 0 on success, AVERROR on failure.
> */
> +av_warn_unused_result
> int swr_config_frame(SwrContext *swr, const AVFrame *out, const AVFrame *in);
>
> /**
> --
> 2.6.1
>
ping
More information about the ffmpeg-devel
mailing list