diff -uNrp a/common/common.c b/common/common.c --- a/common/common.c 2009-10-26 11:18:13 +0200 +++ b/common/common.c 2009-10-30 12:35:32 +0200 @@ -821,7 +821,7 @@ void x264_reduce_fraction( int *n, int * char *x264_slurp_file( const char *filename ) { int b_error = 0; - int i_size; + int64_t i_size; char *buf; FILE *fh = fopen( filename, "rb" ); if( !fh ) diff -uNrp a/common/common.h b/common/common.h --- a/common/common.h 2009-10-26 11:18:13 +0200 +++ b/common/common.h 2009-10-30 12:35:47 +0200 @@ -80,6 +80,7 @@ do {\ #include "dct.h" #include "cabac.h" #include "quant.h" +#include "config.h" /**************************************************************************** * General functions diff -uNrp a/encoder/encoder.c b/encoder/encoder.c --- a/encoder/encoder.c 2009-10-26 11:18:13 +0200 +++ b/encoder/encoder.c 2009-10-30 12:36:18 +0200 @@ -67,7 +67,7 @@ static void x264_frame_dump( x264_t *h ) if( !f ) return; /* Write the frame in display order */ - fseek( f, h->fdec->i_frame * h->param.i_height * h->param.i_width * 3/2, SEEK_SET ); + fseek( f, (uint64_t)h->fdec->i_frame * h->param.i_height * h->param.i_width * 3/2, SEEK_SET ); for( i = 0; i < h->fdec->i_plane; i++ ) for( y = 0; y < h->param.i_height >> !!i; y++ ) fwrite( &h->fdec->plane[i][y*h->fdec->i_stride[i]], 1, h->param.i_width >> !!i, f ); diff -uNrp a/encoder/set.c b/encoder/set.c --- a/encoder/set.c 2009-10-26 11:18:13 +0200 +++ b/encoder/set.c 2009-10-30 12:36:32 +0200 @@ -24,7 +24,6 @@ #include #include "common/common.h" -#include "config.h" #include "set.h" #define bs_write_ue bs_write_ue_big diff -uNrp a/input/y4m.c b/input/y4m.c --- a/input/y4m.c 2009-10-26 11:18:13 +0200 +++ b/input/y4m.c 2009-10-30 12:37:15 +0200 @@ -160,11 +160,11 @@ static int get_frame_total( hnd_t handle { y4m_hnd_t *h = handle; int i_frame_total = 0; - uint64_t init_pos = ftell( h->fh ); + int64_t init_pos = ftell( h->fh ); if( !fseek( h->fh, 0, SEEK_END ) ) { - uint64_t i_size = ftell( h->fh ); + int64_t i_size = ftell( h->fh ); fseek( h->fh, init_pos, SEEK_SET ); i_frame_total = (int)((i_size - h->seq_header_len) / (3*(h->width*h->height)/2+h->frame_header_len)); diff -uNrp a/input/yuv.c b/input/yuv.c --- a/input/yuv.c 2009-10-26 11:18:13 +0200 +++ b/input/yuv.c 2009-10-30 12:38:03 +0200 @@ -57,7 +57,7 @@ static int get_frame_total( hnd_t handle if( !fseek( h->fh, 0, SEEK_END ) ) { - uint64_t i_size = ftell( h->fh ); + int64_t i_size = ftell( h->fh ); fseek( h->fh, 0, SEEK_SET ); i_frame_total = (int)(i_size / ( h->width * h->height * 3 / 2 )); } diff -uNrp a/x264.c b/x264.c --- a/x264.c 2009-10-26 11:18:13 +0200 +++ b/x264.c 2009-10-30 12:39:15 +0200 @@ -32,7 +32,6 @@ #include "common/cpu.h" #include "x264.h" #include "muxers.h" -#include "config.h" #ifdef _WIN32 #include @@ -1036,7 +1035,7 @@ static void parse_qpfile( cli_opt_t *opt { int num = -1, qp, ret; char type; - uint64_t file_pos; + int64_t file_pos; while( num < i_frame ) { file_pos = ftell( opt->qpfile );