Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
frame_size = picture_width * picture_height + ((picture_width * picture_height) >> 1) ;
if ( (file_size < frame_size) || (file_size % frame_size) ) {
+ fclose(yuv_fp);
printf("The YUV file's size is not correct\n");
return -1;
}
avc_fp = fopen(argv[4], "wb");
if ( avc_fp == NULL) {
+ fclose(yuv_fp);
printf("Can't open output avc file\n");
return -1;
}
release_encode_resource();
destory_encode_pipe();
+ fclose(yuv_fp);
+ fclose(avc_fp);
+
return 0;
}