> On Feb 26, 2013, at 1:01 PM, René J.V. Bertin > <[email protected]> wrote: > > What I don't dare > > to guess is why the void* type isn't used - is there a practical reason > > or only a 'programming principle' behind that?
You can not do pointer arithmetic with void pointers. Therefore, for some simple task (for example, copying n samples from position m to position p), having the pointer already with a suitable type avoids an additional cast. L'octidi 8 ventôse, an CCXXI, Brad O'Hearne a écrit : > Perhaps I've been staring at this too long and am losing my mind, but > there is a difference between uint8_t and int8_t: This difference is irrelevant for pointer arithmetic, it is only relevant when dereferencing the pointer. You are not supposed to dereference these pointers directly, you are supposed to cast them to the actual type of the samples before. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
