[FFmpeg-devel] regression - mpeg2 interlace/topfield flags not set anymore

Reimar Döffinger Reimar.Doeffinger
Sun Jan 27 22:40:03 CET 2008


On Sun, Jan 27, 2008 at 04:04:27PM -0500, Rich Felker wrote:
> On Sun, Jan 27, 2008 at 02:32:08PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > On Sun, Jan 27, 2008 at 01:18:54PM +0000, M?ns Rullg?rd wrote:
> > > Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> > > > 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.
> > 
> > I think this should not break anything, since it should only do
> > something in already broken cases.
> 
> No, it breaks things on CORRECT platforms for the sake of working
> around a bug on BROKEN platforms. This is unacceptable.

Well, then maybe this one. But even if I didn't make any real error this
is still a stupid way to solve this...
-------------- next part --------------
Index: libavcodec/eval.c
===================================================================
--- libavcodec/eval.c	(revision 11641)
+++ libavcodec/eval.c	(working copy)
@@ -91,6 +91,8 @@
     double d;
     char *next;
     d = strtod(name, &next);
+    if (next == name + 1 && 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) {
 



More information about the ffmpeg-devel mailing list