[FFmpeg-devel] [PATCH] avutil/frame: add av_warn_unused_result
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Oct 29 03:53:36 CET 2015
On Thu, Oct 15, 2015 at 7:47 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> This is going to trigger a lot of warnings all over the place that need
> fixing. Main culprits are in avfilter, when one tries to copy a frame
> without checking whether src and dest formats actually are compatible.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libavutil/frame.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavutil/frame.h b/libavutil/frame.h
> index 9c6061a..5dfac64 100644
> --- a/libavutil/frame.h
> +++ b/libavutil/frame.h
> @@ -575,6 +575,7 @@ void av_frame_free(AVFrame **frame);
> *
> * @return 0 on success, a negative AVERROR on error
> */
> +av_warn_unused_result
> int av_frame_ref(AVFrame *dst, const AVFrame *src);
>
> /**
> @@ -613,6 +614,7 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
> *
> * @return 0 on success, a negative AVERROR on error.
> */
> +av_warn_unused_result
> int av_frame_get_buffer(AVFrame *frame, int align);
>
> /**
> @@ -640,6 +642,7 @@ int av_frame_is_writable(AVFrame *frame);
> * @see av_frame_is_writable(), av_buffer_is_writable(),
> * av_buffer_make_writable()
> */
> +av_warn_unused_result
> int av_frame_make_writable(AVFrame *frame);
>
> /**
> @@ -653,6 +656,7 @@ int av_frame_make_writable(AVFrame *frame);
> *
> * @return >= 0 on success, a negative AVERROR on error.
> */
> +av_warn_unused_result
> int av_frame_copy(AVFrame *dst, const AVFrame *src);
>
> /**
> @@ -663,6 +667,7 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src);
> * aspect ratio (for video), but not width/height or channel layout.
> * Side data is also copied.
> */
> +av_warn_unused_result
> int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
>
> /**
> --
> 2.6.1
>
ping
More information about the ffmpeg-devel
mailing list