# HG changeset patch # User diego # Date 1319147370 0 # Node ID cc8dfde2b6c556b8b6783ebd3cf9c6b9bec75d2e # Parent 00885417afc8f331e341fa792321612ff2e69d26 Fix off_t printf conversion specifiers and related warnings. diff -r 00885417afc8 -r cc8dfde2b6c5 libmpcodecs/ve_vfw.c --- a/libmpcodecs/ve_vfw.c Thu Oct 20 16:42:31 2011 +0000 +++ b/libmpcodecs/ve_vfw.c Thu Oct 20 21:49:30 2011 +0000 @@ -147,7 +147,7 @@ return NULL; } fclose(fd); - mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %d bytes\n", st.st_size); + mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %"PRIu64"d bytes\n", st.st_size); if (!(temp_len = (unsigned int) ICSendMessage(encoder_hic, ICM_SETSTATE, (LPARAM) drvdata, (int) st.st_size))){ mp_msg(MSGT_WIN32,MSGL_ERR,"ICSetState failed!\n"); free(drvdata); diff -r 00885417afc8 -r cc8dfde2b6c5 libmpdemux/demux_nsv.c --- a/libmpdemux/demux_nsv.c Thu Oct 20 16:42:31 2011 +0000 +++ b/libmpdemux/demux_nsv.c Thu Oct 20 21:49:30 2011 +0000 @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include #include @@ -75,7 +76,8 @@ // sometimes instead of 0xBEEF as described for the next audio/video chunk we get // a whole new header - mp_dbg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %08X %08X\n",hdr[0]<<8|hdr[1],stream_tell(demuxer->stream)); + mp_dbg(MSGT_DEMUX, MSGL_DBG2, "demux_nsv: %08X %08"PRIu64"X\n", + hdr[0] << 8 | hdr[1], stream_tell(demuxer->stream)); switch(hdr[0]<<8|hdr[1]) { case 0x4E53: if(hdr[2]==0x56 && hdr[3]==0x73){ diff -r 00885417afc8 -r cc8dfde2b6c5 libmpdemux/muxer_avi.c --- a/libmpdemux/muxer_avi.c Thu Oct 20 16:42:31 2011 +0000 +++ b/libmpdemux/muxer_avi.c Thu Oct 20 21:49:30 2011 +0000 @@ -486,7 +486,9 @@ } else { if (stream_tell(muxer->stream) != MOVIALIGN) { mp_msg(MSGT_MUXER, MSGL_ERR, "Opendml superindex is too big for reserved space!\n"); - mp_msg(MSGT_MUXER, MSGL_ERR, "Expected filepos %d, real filepos %ld, missing space %ld\n", MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream)-MOVIALIGN); + mp_msg(MSGT_MUXER, MSGL_ERR, + "Expected filepos %d, real filepos %"PRIu64"d, missing space %"PRIu64"d\n", + MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream) - MOVIALIGN); mp_msg(MSGT_MUXER, MSGL_ERR, "Try increasing MOVIALIGN in libmpdemux/muxer_avi.c\n"); } write_avi_list(muxer->stream,listtypeAVIMOVIE,muxer->movi_end-stream_tell(muxer->stream)-12); diff -r 00885417afc8 -r cc8dfde2b6c5 stream/stream.h --- a/stream/stream.h Thu Oct 20 16:42:31 2011 +0000 +++ b/stream/stream.h Thu Oct 20 21:49:30 2011 +0000 @@ -294,11 +294,11 @@ inline static int stream_seek(stream_t *s,off_t pos){ - mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos); + mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIu64"X\n", pos); if (pos < 0) { - mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid seek to negative position %llx!\n", - (long long)pos); + mp_msg(MSGT_DEMUX, MSGL_ERR, + "Invalid seek to negative position %"PRIu64"x!\n", pos); pos = 0; } if(pospos){ diff -r 00885417afc8 -r cc8dfde2b6c5 stream/stream_vstream.c --- a/stream/stream_vstream.c Thu Oct 20 16:42:31 2011 +0000 +++ b/stream/stream_vstream.c Thu Oct 20 21:49:30 2011 +0000 @@ -153,7 +153,7 @@ stream->start_pos = 0; stream->end_pos = vstream_streamsize(); - mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %d\n", stream->end_pos); + mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %"PRIu64"d\n", stream->end_pos); stream->priv = p; stream->fill_buffer = fill_buffer; diff -r 00885417afc8 -r cc8dfde2b6c5 sub/vobsub.c --- a/sub/vobsub.c Thu Oct 20 16:42:31 2011 +0000 +++ b/sub/vobsub.c Thu Oct 20 21:49:30 2011 +0000 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -695,7 +696,7 @@ { int h, m, s, ms; off_t filepos; - if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09lx", + if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09"PRIu64"x", &h, &m, &s, &ms, &filepos) != 5) return -1; return vobsub_add_timestamp(vob, filepos, vob->delay + ms + 1000 * (s + 60 * (m + 60 * h)));