[FFmpeg-devel] [PATCH] lavfi/mandelbrot: check retn value of ff_get_video_buffer()

Stefano Sabatini stefasab at gmail.com
Tue Apr 9 00:45:10 CEST 2013


On date Monday 2013-04-08 18:48:58 +0000, Paul B Mahol encoded:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavfilter/vsrc_mandelbrot.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
> index 7bbdf95..c91494b 100644
> --- a/libavfilter/vsrc_mandelbrot.c
> +++ b/libavfilter/vsrc_mandelbrot.c
> @@ -403,6 +403,9 @@ static int request_frame(AVFilterLink *link)
>  {
>      MBContext *mb = link->src->priv;
>      AVFrame *picref = ff_get_video_buffer(link, mb->w, mb->h);
> +    if (!picref)
> +        return AVERROR(ENOMEM);
> +
>      picref->sample_aspect_ratio = (AVRational) {1, 1};
>      picref->pts = mb->pts++;

Fix the typo in the subject while at it.
-- 
FFmpeg = Frenzy Fancy Mere Perfectionist Elastic Gadget


More information about the ffmpeg-devel mailing list