Re: [FFmpeg-devel] [PATCH] avutil/frame: add av_warn_unused_result

2015-10-30 Thread Michael Niedermayer
On Thu, Oct 15, 2015 at 07:47:47PM -0400, Ganesh Ajjanagadde 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.

if a filter allocated both source and destination itself with the
same parameters then i think it does not need to check if copy fails

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/frame: add av_warn_unused_result

2015-10-28 Thread Ganesh Ajjanagadde
On Thu, Oct 15, 2015 at 7:47 PM, Ganesh Ajjanagadde
 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 
> ---
>  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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel