[MPlayer-dev-eng] [PATCH] a couple of warning fixes in qt decoder and encoder

Arpi arpi at thot.banki.hu
Thu Dec 19 00:48:26 CET 2002


Hi,

> > > > -    printf("Found it! ID = 0x%X\n",prev);
> > > > +    printf("Found it! ID = %p\n",prev);
> > > 
> > > prev isn't a pointer but a 6-digit component id.
> > 
> > Hmm... I'll have to recheck it then.
> 
> Looks like it is a pointer after all:
> libmpcodecs/vd_qtvideo.c:96
> [...]
>     ComponentDescription desc;
>     Component prev=NULL;
>     CodecInfo cinfo;    // for ImageCodecGetCodecInfo() 
> [...]
> 
> loader/qtx/qtxsdk/components.h:67
> [...]
> struct __attribute__((__packed__)) ComponentRecord {
>     long                            data[1];
> };
> typedef struct ComponentRecord          ComponentRecord;
> typedef ComponentRecord *               Component;
> [...]

qtx sdk always suprises me, its typedefs are so dummy & silly.

> So the question is, what are we printing here? prev's address or contents?

please understand, prev is NOT and address. it's a component ID value,
usually 0x8300xx, it's constructed by component_class<<16 + component
serial number. if you try to dereferece it you'll get sig11 of course.
the qt component code splits it to class number, selects the right component
table based on it and then index teh tabel with the compoennt serial number.
i can copypaste the disasmed code for you if interested.

even if it's defined as pointer by the silly sdk, it is NOT pointer.
maybe it is on MacOS, but not on x86.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list