[FFmpeg-devel] [PATCH 06/21] Make av_set_string3() check in the list of named constants before to try to evaluate the string to set with ff_eval2().

Stefano Sabatini stefano.sabatini-lala
Mon Apr 19 00:37:57 CEST 2010


On date Saturday 2010-04-17 23:45:44 +0200, Michael Niedermayer encoded:
> On Sun, Apr 11, 2010 at 01:00:29AM +0200, Stefano Sabatini wrote:
> > Avoid a spurious log error message issued by a call to ff_eval2() in
> > the case where the string to set is a named constant.
> 
> do you have a testcase that shows this bug?

This is related to the ff_parse_expr() interface change, which makes
the function log an error rather than fill an error string pointer.

The problem shows up everytime we use av_set_string3(): if the value
for the string is a named value, the evaluation, which is performed
*before* the check for named values, will issue a log error message.

My fix is to perform the check for named values *before* to evaluate
the string, and just if that fails try to perform evaluation.

Regards.
-- 
FFmpeg = Frenzy Foolish Magnificient Peaceful Educated Gnome



More information about the ffmpeg-devel mailing list