[FFmpeg-devel] [PATCH] fix printf length modifier in mpeg12.c
Thu Mar 13 20:06:29 CET 2008
On Thu, Mar 13, 2008 at 07:38:02PM +0100, Diego Biurrun wrote:
> I noticed a warning in mpeg12.c on OS X that hinted at a wrong printf
> length modifier. Indeed line 2310 looks suspcious:
> av_log(avctx, AV_LOG_DEBUG, "%3X at %hd left %d\n", start_code, buf_ptr-buf, input_size);
> Both buf_ptr and buf have type const uint8_t*, so the correct length
> modifier should be either 'h' or none.
Huh? It's a difference of pointers, so z is most likely to be correct, though
using just %d and casting to int might be more portable and good enough.
More information about the ffmpeg-devel