胡斌

fix bug in linux for loading codec param from cfg file

@@ -28,7 +28,7 @@ vector<fileinfo> media_files[2]; @@ -28,7 +28,7 @@ vector<fileinfo> media_files[2];
28 void run_shell_cmd(const char * cmd) 28 void run_shell_cmd(const char * cmd)
29 { 29 {
30 if (only_print){ 30 if (only_print){
31 - printf("\n%s", cmd); 31 + printf("%s\n", cmd);
32 } 32 }
33 else { 33 else {
34 system(cmd); 34 system(cmd);
@@ -247,7 +247,8 @@ void load_codec_param() @@ -247,7 +247,8 @@ void load_codec_param()
247 GetExePath(); 247 GetExePath();
248 strcpy(cfgfile, exe_path); 248 strcpy(cfgfile, exe_path);
249 #else 249 #else
250 - strcpy(cfgfile , "~/"; 250 + strcpy(cfgfile ,getenv("HOME"));
  251 + strcat(cfgfile ,"/");
251 #endif 252 #endif
252 strcat(cfgfile, "merge_av.cfg"); 253 strcat(cfgfile, "merge_av.cfg");
253 ifstream fin(cfgfile); 254 ifstream fin(cfgfile);