From 028b3ffa9071042468f2cc51580fa6ef65d6ff95 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Sat, 31 Oct 2009 19:51:14 -0700 Subject: [PATCH] Fix large file support, broken in r1302 --- common/common.h | 1 + encoder/encoder.c | 2 +- encoder/set.c | 1 - x264.c | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/common.h b/common/common.h index ec61e144..d7c51d5e 100644 --- a/common/common.h +++ b/common/common.h @@ -80,6 +80,7 @@ do {\ #include "dct.h" #include "cabac.h" #include "quant.h" +#include "config.h" /**************************************************************************** * General functions diff --git a/encoder/encoder.c b/encoder/encoder.c index 02d469ac..465789d4 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -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 --git a/encoder/set.c b/encoder/set.c index e087f834..fd1a22ee 100644 --- a/encoder/set.c +++ b/encoder/set.c @@ -24,7 +24,6 @@ #include #include "common/common.h" -#include "config.h" #include "set.h" #define bs_write_ue bs_write_ue_big diff --git a/x264.c b/x264.c index c1728f1b..d845a478 100644 --- a/x264.c +++ b/x264.c @@ -32,7 +32,6 @@ #include "common/cpu.h" #include "x264.h" #include "muxers.h" -#include "config.h" #ifdef _WIN32 #include -- 2.47.3