[FFmpeg-devel] [PATCH] lavfi test pattern generator

Nicolas George nicolas.george at normalesup.org
Sat Jun 18 20:20:09 CEST 2011


Le decadi 30 prairial, an CCXIX, Stefano Sabatini a écrit :
> +    char *size;                 ///< video frame size
> +    char *rate;                 ///< video frame rate
> +    char *duration;             ///< total duration of the generated video

Isn't it a bother to have these fields in the context while their only use
is to be immediately parsed into other fields?

> +    { "size",     "Set video size, accept a string describing frame size, such as 640x480 or hd720.", OFFSET(size), FF_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },

Nit: describing *the* frame size, maybe. And possibly set *the* video size.

> +    if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0) {

With current Git, this segfaults with '-vf test', but works with '-vf
test=', because av_set_options_string assumes that args is not null.

A potential fix would be to add near the beginning of av_set_options_string:

    if (!opts)
	return 0;

I do not know if you have something in that sense in your working tree.

> + * Fill rectangle with value val.

Fill *a* rectangle.

The rests looks like worthy enhancement on top of my old patch. Thanks for
bringing it back.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110618/6eb32cf6/attachment.asc>


More information about the ffmpeg-devel mailing list