[FFmpeg-devel] [WIP] life source

Clément Bœsch ubitux at gmail.com
Sun Nov 20 20:11:05 CET 2011


On Sat, Nov 19, 2011 at 11:14:46PM +0100, Stefano Sabatini wrote:
> On date Sunday 2011-06-26 20:11:52 +0200, Stefano Sabatini encoded:
> > From 680fc136c9f85e289b86195dc54e5b76bffe6b97 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Sun, 26 Jun 2011 19:47:18 +0200
> > Subject: [PATCH] lavfi: add lifesrc source
> > 
> > ---
> >  libavfilter/Makefile       |    1 +
> >  libavfilter/allfilters.c   |    1 +
> >  libavfilter/vsrc_lifesrc.c |  305 ++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 307 insertions(+), 0 deletions(-)
> >  create mode 100644 libavfilter/vsrc_lifesrc.c
> 
> Well since I'm in an all-play-no-work mood I worked to an updated
> version.
> 
> I could also add support to "bricks" (cells which can't never be
> filled) and provide an option for specifying connected topology, but
> that can be done later.
> 
> Example:
> ffplay -f lavfi "lifesrc=f=CREDITS:s=300x300:rule=21219, boxblur=2:2, negate"

fun :)

[...]
> +
> +    if (!life->filename) {
> +        av_log(ctx, AV_LOG_ERROR, "No filename specified, aborting\n");
> +        return AVERROR(EINVAL);
> +    }
> +
> +    if ((ret = init_pattern_from_file(ctx) < 0))
> +        return ret;

if ((ret = ...) < 0), or else it will crash with for instance an empty
file.

BTW, I agree with both Michael and Nicolas about having it upstream (I
want to do something on it :)) and the random init board in case of no
file.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111120/7cc400fa/attachment.asc>


More information about the ffmpeg-devel mailing list