# HG changeset patch # User ib # Date 1317303331 0 # Node ID 8a7056729022986bd7ed7adfe8b3bc5f22b86d50 # Parent 54becc464788a6331f5782fd0b057f1b7a8cc626 Change guiInfo.Filename by using uiSetFileName() only. The two nfree() may be omitted, because they are performed in uiSetFileName(). diff -r 54becc464788 -r 8a7056729022 gui/interface.c --- a/gui/interface.c Thu Sep 29 13:26:32 2011 +0000 +++ b/gui/interface.c Thu Sep 29 13:35:31 2011 +0000 @@ -406,7 +406,7 @@ char tmp[512]; sprintf(tmp, "vcd://%d", guiInfo.Track); - setdup(&guiInfo.Filename, tmp); + uiSetFileName(NULL, tmp, STREAMTYPE_VCD); } break; #endif @@ -417,7 +417,7 @@ char tmp[512]; sprintf(tmp, "dvd://%d", guiInfo.Track); - setdup(&guiInfo.Filename, tmp); + uiSetFileName(NULL, tmp, STREAMTYPE_DVD); } dvd_chapter = guiInfo.Chapter; @@ -768,11 +768,8 @@ if (guiInfo.Playing && (next = listSet(gtkGetNextPlItem, NULL)) && (plLastPlayed != next)) { plLastPlayed = next; - setddup(&guiInfo.Filename, next->path, next->name); - guiInfo.StreamType = STREAMTYPE_FILE; + uiSetFileName(next->path, next->name, STREAMTYPE_FILE); guiInfo.NewPlay = GUI_FILE_NEW; - nfree(guiInfo.AudioFilename); - nfree(guiInfo.SubtitleFilename); guiInfo.Track++; } else { if (guiInfo.NewPlay == GUI_FILE_NEW) diff -r 54becc464788 -r 8a7056729022 gui/ui/gtk/fileselect.c --- a/gui/ui/gtk/fileselect.c Thu Sep 29 13:26:32 2011 +0000 +++ b/gui/ui/gtk/fileselect.c Thu Sep 29 13:35:31 2011 +0000 @@ -489,11 +489,8 @@ switch ( fsType ) { case fsVideoSelector: - setddup( &guiInfo.Filename,fsSelectedDirectory,fsSelectedFile ); - guiInfo.StreamType=STREAMTYPE_FILE; + uiSetFileName( fsSelectedDirectory,fsSelectedFile,STREAMTYPE_FILE ); guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0; - nfree( guiInfo.AudioFilename ); - nfree( guiInfo.SubtitleFilename ); fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history break; case fsSubtitleSelector: diff -r 54becc464788 -r 8a7056729022 gui/win32/interface.c --- a/gui/win32/interface.c Thu Sep 29 13:26:32 2011 +0000 +++ b/gui/win32/interface.c Thu Sep 29 13:35:31 2011 +0000 @@ -457,7 +457,7 @@ dvd_title = 0; force_fps = 0; if(!mygui->playlist->tracks) return 0; - setdup(&guiInfo.Filename, mygui->playlist->tracks[mygui->playlist->current]->filename); + uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE); guiInfo.Track = mygui->playlist->current + 1; if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); if(gtkAOExtraStereo) @@ -483,7 +483,7 @@ dvd_chapter = guiInfo.Chapter; dvd_angle = guiInfo.Angle; sprintf(tmp,"dvd://%d", guiInfo.Track); - setdup(&guiInfo.Filename, tmp); + uiSetFileName(NULL, tmp, STREAMTYPE_DVD); break; } #endif