[openbeosmediakit] Re: Question on new codec API

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosmediakit@xxxxxxxxxxxxx
  • Date: Fri, 05 Dec 2003 19:01:25 +0100 CET

"David McPaul" <dmcpaul@xxxxxxxxxxxxxx> wrote:
>       Regarding the supplying of the stream number vs not supplying it.  
> I am generally against casting void pointers to something they are 
> not 
> just to find out what they really are so I can cast properly.

Then do it like this:

struct generic_cookie {
        int32   stream_number;
};

struct audio_cookie : generic_cookie {
        ...
};

struct video_cookie : generic_cookie {
        ...
};

:-)

Bye,
   Axel.


Other related posts: