Le sextidi 16 thermidor, an CCXXIV, Carl Eugen Hoyos a écrit : > To: "This list is about using libavcodec, libavformat, libavutil, > libavdevice and libavfilter." <libav-u...@ffmpeg.org>
Why did you post to this list? > Subject: [PATCH] lavc/vaapi_encode_h26x: Fix a crash if "." is not the > decimal separator. > - { "i_qfactor", "1.0" }, > - { "i_qoffset", "0.0" }, > - { "b_qfactor", "1.2" }, > - { "b_qoffset", "0.0" }, > + { "i_qfactor", "1" }, > + { "i_qoffset", "0" }, > + { "b_qfactor", "6/5" }, > + { "b_qoffset", "0" }, I think this is not correct at all. First, the code should not crash with incorrect parameters, it should either return a proper error code or accept the values with a sane meaning. Second, this is not fixing the issue, it is just working around it. These options can also be set by applications or users, and the point is supposed to work. The correct fix for the parsing side of the issue would be either to document that the FFmpeg libraries cannot be used with LC_NUMERIC set to anything else than C/POSIX (and possibly add a check at init time) or change the code to use an unlocalized version of strtod(). I am rather in favour of the first solution, as anybody who setlocale(LC_NUMERIC) in their are idiots and will break much more than FFmpeg libraries. Of course, this is on top of fixing the encoders to not crash with the offending values. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel