[openbeosmediakit] Re: Question on new codec API

"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: