胡斌

use first name

@@ -813,7 +813,7 @@ int get_output_file_name(int i, const char * file_prefix, char * outputfile){ @@ -813,7 +813,7 @@ int get_output_file_name(int i, const char * file_prefix, char * outputfile){
813 return 0; 813 return 0;
814 } 814 }
815 815
816 -bool is_need_output(int nOutPutFile, vector<media_info> & cur_processing, char * outputfile) 816 +bool is_need_output(int nOutPutFile, vector<media_info> & cur_processing, const char * first_file, char * outputfile)
817 { 817 {
818 if (sorted_infos.size()) { 818 if (sorted_infos.size()) {
819 int lastEnd = cur_processing[cur_processing.size() - 1].type_time; 819 int lastEnd = cur_processing[cur_processing.size() - 1].type_time;
@@ -823,7 +823,7 @@ bool is_need_output(int nOutPutFile, vector<media_info> & cur_processing, char * @@ -823,7 +823,7 @@ bool is_need_output(int nOutPutFile, vector<media_info> & cur_processing, char *
823 } 823 }
824 } 824 }
825 825
826 - get_output_file_name(nOutPutFile, cur_processing[0].name.c_str(), outputfile); 826 + get_output_file_name(nOutPutFile, first_file, outputfile);
827 return true; 827 return true;
828 } 828 }
829 829
@@ -839,9 +839,11 @@ int process_va_files() @@ -839,9 +839,11 @@ int process_va_files()
839 { 839 {
840 char outputfile[1024]; 840 char outputfile[1024];
841 vector<media_info> cur_processing; 841 vector<media_info> cur_processing;
  842 +
842 int nOutPutFile = 0; 843 int nOutPutFile = 0;
843 float start_time; 844 float start_time;
844 bool is_start = true; 845 bool is_start = true;
  846 + string start_file;
845 847
846 while (sorted_infos.size()) 848 while (sorted_infos.size())
847 { 849 {
@@ -870,9 +872,10 @@ int process_va_files() @@ -870,9 +872,10 @@ int process_va_files()
870 //if the duration between the processed end and the start of not processed is large than 200 ms, reopen a new file 872 //if the duration between the processed end and the start of not processed is large than 200 ms, reopen a new file
871 if (is_start){ 873 if (is_start){
872 start_time = cur_processing[0].start_time; 874 start_time = cur_processing[0].start_time;
  875 + start_file = cur_processing[0].name;
873 is_start = false; 876 is_start = false;
874 } 877 }
875 - if (is_need_output(nOutPutFile, cur_processing, outputfile)){ 878 + if (is_need_output(nOutPutFile, cur_processing, start_file.c_str(), outputfile)){
876 nOutPutFile++; 879 nOutPutFile++;
877 concate_files_and_adjust_timecode(outputfile); 880 concate_files_and_adjust_timecode(outputfile);
878 save_out_info(start_time, outputfile); 881 save_out_info(start_time, outputfile);