胡斌

add -n to support only merge pip,that is the input file is the output of merge_av

正在显示 1 个修改的文件 包含 29 行增加16 行删除
... ... @@ -1452,6 +1452,8 @@ int main(int argc, char * argv[])
load_codec_param();
bool bmerge_files = true;
for (int i = 3; i < argc; i++){
if (!strcmp(argv[i], "-p")){
only_print = true;
... ... @@ -1459,28 +1461,39 @@ int main(int argc, char * argv[])
else if (!strcmp(argv[i], "-k")){
keep_tmp_files = true;
}
else if (!strcmp(argv[i], "-n")){
bmerge_files = false;
}
}
char merged_info1[1024];
if (readfile(argv[1]) < 0) {
printf("open file: %s error", argv[1]);
return -2;
}
char merged_info2[1024];
get_outinfo_file_name(argv[1]);
strcpy(merged_info1, out_info_file);
process_record_file_to_ts();
if (bmerge_files) {
if (readfile(argv[1]) < 0) {
printf("open file: %s error", argv[1]);
return -2;
}
get_outinfo_file_name(argv[1]);
strcpy(merged_info1, out_info_file);
process_record_file_to_ts();
char merged_info2[1024];
if (readfile(argv[2]) < 0) {
printf("open file: %s error", argv[1]);
return -2;
}
get_outinfo_file_name(argv[2]);
strcpy(merged_info2, out_info_file);
process_record_file_to_ts();
if (readfile(argv[2]) < 0) {
printf("open file: %s error", argv[1]);
return -2;
}
get_outinfo_file_name(argv[2]);
strcpy(merged_info2, out_info_file);
process_record_file_to_ts();
}
else {
strcpy(merged_info1, argv[1]);
strcpy(merged_info2, argv[2]);
}
media_files.clear();
... ... @@ -1498,7 +1511,7 @@ int main(int argc, char * argv[])
process_merged_files_to_pip_files();
if (!keep_tmp_files) {
if (!keep_tmp_files && bmerge_files) {
removefiles(all_input_files_for_pip);
remove_file(merged_info1);
remove_file(merged_info2);
... ...