[Ffmpeg-cvslog] r8608 - in trunk: Changelog doc/ffmpeg-doc.texi libavcodec/Makefile libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/tiff.c libavcodec/tiff.h libavcodec/tiffenc.c

Michel Bardiaux mbardiaux
Wed Apr 4 17:30:58 CEST 2007

Uoti Urpala wrote:
> On Wed, 2007-04-04 at 16:51 +0200, Michel Bardiaux wrote:
>> Uoti Urpala wrote:
>>> &s->width would be a pointer to int, which is wrong as a pointer to
>>> uint32_t is needed.
>> add_entry just needs void*.
> No it needs a pointer to a 4 byte int. The parameter type of the
> function is void *, but there are semantic requirements beyond that.
> void * doesn't mean you could pass it any random pointer whatsoever and
> expect it to do something sensible.
Sometimes its a 2-bytes unsigned. But you're right, &s->width would not 
work if sizeof(int)!=4. I suppose the way to go is:

uint32_t buf32;
buf32 = s->width;
add_entry(s, TIFF_WIDTH,TIFF_LONG,1,&buf32);

Which is awkward, which explains why C9x introduced the construct.

Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles

More information about the ffmpeg-cvslog mailing list