summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-09-10 12:22:39 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2015-09-15 12:02:55 +0800
commit6712547f112e008335e637d009d714bc7debab79 (patch)
tree0fcf24e0098176e5c060090fd065ef6e826ca566
parentc74f846b8e9c94a4b52b2e32f12d8c9fe62a93af (diff)
downloadlibva-6712547f112e008335e637d009d714bc7debab79.tar.gz
avcenc: support large source file
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit 29ad40444f3ed68e5f54ddd70dd256ea41e0456f) Conflicts: test/encode/avcenc.c
-rw-r--r--test/encode/avcenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/encode/avcenc.c b/test/encode/avcenc.c
index d41fb1b..4d49e7f 100644
--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -1664,7 +1664,7 @@ encode_picture(FILE *yuv_fp, FILE *avc_fp,
index = SID_INPUT_PICTURE_0;
if ( next_display_num >= frame_number )
next_display_num = frame_number - 1;
- fseek(yuv_fp, frame_size * next_display_num, SEEK_SET);
+ fseeko(yuv_fp, (off_t)frame_size * next_display_num, SEEK_SET);
avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
avcenc_context.upload_thread_param.surface_id = surface_ids[index];
@@ -1946,8 +1946,8 @@ int main(int argc, char *argv[])
printf("Can't open input YUV file\n");
return -1;
}
- fseek(yuv_fp,0l, SEEK_END);
- file_size = ftell(yuv_fp);
+ fseeko(yuv_fp, (off_t)0, SEEK_END);
+ file_size = ftello(yuv_fp);
frame_size = picture_width * picture_height + ((picture_width * picture_height) >> 1) ;
if ( (file_size < frame_size) || (file_size % frame_size) ) {
@@ -1956,7 +1956,7 @@ int main(int argc, char *argv[])
return -1;
}
frame_number = file_size / frame_size;
- fseek(yuv_fp, 0l, SEEK_SET);
+ fseeko(yuv_fp, (off_t)0, SEEK_SET);
avc_fp = fopen(argv[4], "wb");
if ( avc_fp == NULL) {