[FFmpeg-devel] regression - mpeg2 interlace/topfield flags not set anymore
Måns Rullgård
mans
Sun Jan 27 14:18:54 CET 2008
Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> Hello,
> On Sun, Jan 27, 2008 at 09:59:08AM +0100, Reimar D?ffinger wrote:
>> On Sun, Jan 27, 2008 at 09:27:58AM +0100, christophelorenz wrote:
>> > Rich Felker wrote:
>> > > Apparently libbrokenos needs to replace strtod with a working
>> > >version...
>> > >
>> > Is there an alternative to libbrokenos ? (Yes, I know one, but I won't
>> > name it)
>> > Can we implement a new strtod in ff ?
>>
>> We already have av_strtod, but it is not used consistently (actually it
>> is only used in eval.c).
>> Attached patch adds a workaround to it, but I have some doubts if it
>> should be done (on the other hand libbrokenos is not yet ready it
>> seems...).
>
> Sorry, this is a patch that actually compiles. No idea if it works
> though, I am not running a broken os right now :-P
>
> Index: libavcodec/eval.c
> ===================================================================
> --- libavcodec/eval.c (revision 11627)
> +++ libavcodec/eval.c (working copy)
> @@ -91,6 +91,8 @@
> double d;
> char *next;
> d = strtod(name, &next);
> + if (d == 0 && name[0] == '0' && name[1] == 'x') // HACK around broken strtod
> + d = strtol(name, &next, 0);
> /* if parsing succeeded, check for and interpret postfixes */
> if (next!=name) {
This will break non-integer hex values.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list