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

Nicolas George george at nsup.org
Sun Nov 3 19:11:52 CET 2013


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.

Regards,

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


More information about the ffmpeg-devel mailing list