[FFmpeg-devel] [PATCH] ffmpeg: add verbose consistency checks in case of filtering inconsistent options

Stefano Sabatini stefasab at gmail.com
Sun Nov 3 19:26:17 CET 2013


On date Sunday 2013-11-03 19:11:52 +0100, Nicolas George encoded:
> Le tridi 13 brumaire, an CCXXII, Stefano Sabatini a écrit :
> > > > +#define CHECK_STREAMCOPY_FILTERS(ost, type) do {                        \
> > > > +    if (ost->stream_copy) {                                             \
> > > > +        char *filter_script = NULL, *filter = NULL;                     \
> > > > +        MATCH_PER_STREAM_OPT(filter_scripts, str, filter_script, oc, st); \
> > > > +        MATCH_PER_STREAM_OPT(filters,        str, filter,        oc, st); \
> 
> My mail server had hiccups today and my previous mail was delayed, so I
> repeat the remark I made then:
> 
> Doing the match twice in two different places is a bad idea, it usually
> results in both places becoming out of sync somehow. Imagine, for example, a
> change in one of the options merged from the fork.
> 
> My advice is to use the same variable, inited once with
> MATCH_PER_STREAM_OPT, at all places. If necessary, make the variable part of
> the OutputStream structure.

I'll try, but feel free to send a patch yourself, since it will
probably take less time for you to do than to me to figure out the
best way to do it.
-- 
FFmpeg = Faithless Funny Magical Philosophical Esoteric Geisha


More information about the ffmpeg-devel mailing list