[MPlayer-dev-eng] libmpdemux/cache2.c: correct format strings given _FILE_OFFSET_BITS
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Aug 14 10:20:00 CEST 2005
Hi,
On Sat, Aug 13, 2005 at 06:55:57PM -0400, a.guru at sympatico.ca wrote:
> I noticed that "pre:0" was systematically being
> printed in the CACHE_PRE_INIT message, even
> though this value is usually non-zero. This was
> because three 64-bit zero off_t values being
> pushed on the stack before two 32-bit values
> were consumed by mp_msg() as mere 32-bit values.
>
> This patch defines two format-string macros
> according to _FILE_OFFSET_BITS and adds an useful
> new CACHE message.
> --- libmpdemux/cache2.c.orig-1.0pre7 2004-07-26 18:06:30 -0400
> +++ libmpdemux/cache2.c 2005-08-13 18:24:59 -0400
> @@ -27,6 +27,13 @@ static DWORD WINAPI ThreadProc(void* s);
> #endif
>
> #include "mp_msg.h"
> +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
> +# define OFD "lld"
> +# define OFX "llX"
> +#else
> +# define OFD "d"
> +# define OFX "X"
> +#endif
If you get that a better name, put it into config.h and most importantly
find a proper way to fix it for MinGW (that does not support lld but
only e.g. I64d), that would be a nice patch - especially if you add
another define that helps us get rid of the #ifdef in
libmpdemux/network.c (lld vs. I64d)...
> // wait until cache is filled at least prefill_init %
> - mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %d [%d] %d pre:%d eof:%d \n",
> + mp_msg(
> + MSGT_CACHE, MSGL_V,
> + "CACHE: size=%d min=%d prefill=%d buffer_size=%d fill_limit=%d prefill=%d\n",
> + size, min, prefill,
> + s->buffer_size, s->fill_limit, s->prefill);
Adding this messages seems to be an independant part...
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list