[FFmpeg-devel] [PATCH] Replace all %t print prefixes with macros
nicolas.george at normalesup.org
Tue Aug 21 09:31:10 CEST 2012
Le quintidi 5 fructidor, an CCXX, jamal a écrit :
> Some C libraries don't support the %t lenght specifier, resulting in print functions
> outputting said string literally and ignoring the argument
Can you be a little bit more specific in placing the blame?
> - av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%td\n", q - outbuf);
> + av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%" PRIdPTR "\n", q - outbuf);
Note that %td is for ptrdiff_t while PRIdPTR is for intptr_t; there is no
guarantee that they are the same type. In segmented architectures, I guess
ptrdiff_t would be the size of a near pointer while intptr_t would be the
size of a far pointer.
It probably does not change anything on supported architectures, though, but
I am not completely sure about that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel