FILE *fp;
fp = fopen("C:\Users\Administrator\Desktop\工程\rec\str.bin","rb");
if(fp == NULL) return;
len_file = _filelength(_fileno(fp));
len_pack = len_file/10;
if((len_file-len_pack*FrameNum)!=0)
FrameNo = FrameNum+1;
unsigned char **FileBuffer = new unsigned char*[FrameNo]; //待压缩视频文件
for(i=0;i<FrameNo;i++)
FileBuffer[i] = new unsigned char[len_pack];
fseek(fp,0,SEEK_SET);
for(i=0;i<FrameNum;i++) //
{
fread(FileBuffer[i],sizeof(unsigned char),len_pack,fp);
}
if(FrameNo != FrameNum)
{
fread(FileBuffer[i],sizeof(unsigned char),len_file-i*len_pack,fp);
}
fclose(fp);