diff --git a/aegisub/audio_provider_avs.cpp b/aegisub/audio_provider_avs.cpp index 0b27a5b1f..d0fe8b151 100644 --- a/aegisub/audio_provider_avs.cpp +++ b/aegisub/audio_provider_avs.cpp @@ -128,13 +128,13 @@ void AvisynthAudioProvider::OpenAVSAudio() { // Use DirectShowSource else { + wxFileName fn(filename); const char * argnames[3] = { 0, "video", "audio" }; - AVSValue args[3] = { env->SaveString(filename.mb_str(wxConvLocal)), false, true }; + AVSValue args[3] = { env->SaveString(fn.GetShortPath().mb_str(wxConvLocal)), false, true }; script = env->Invoke("DirectShowSource", AVSValue(args,3),argnames); } LoadFromClip(script); - } catch (AvisynthError &err) { diff --git a/aegisub/dialog_detached_video.cpp b/aegisub/dialog_detached_video.cpp index 20e4011a6..993619ff4 100644 --- a/aegisub/dialog_detached_video.cpp +++ b/aegisub/dialog_detached_video.cpp @@ -37,6 +37,7 @@ /////////// // Headers #include +#include #include "dialog_detached_video.h" #include "video_box.h" #include "video_context.h" @@ -48,11 +49,15 @@ // Constructor DialogDetachedVideo::DialogDetachedVideo(FrameMain *par) //: wxFrame(par,-1,_("Detached Video")) -: wxDialog(par,-1,_("Detached Video"),wxDefaultPosition,wxSize(400,300),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxWANTS_CHARS) +: wxDialog(par,-1,_T("Detached Video"),wxDefaultPosition,wxSize(400,300),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxWANTS_CHARS) { // Set parent parent = par; + // Set title + wxFileName fn(VideoContext::Get()->videoName); + SetTitle(wxString::Format(_("Video: %s"),fn.GetFullName())); + // Set a background panel wxPanel *panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN); diff --git a/aegisub/lavc_file.cpp b/aegisub/lavc_file.cpp index 515f28b58..1881fd8f9 100644 --- a/aegisub/lavc_file.cpp +++ b/aegisub/lavc_file.cpp @@ -35,6 +35,7 @@ #include +#include #include "lavc_file.h" LAVCFile::Initializer LAVCFile::init; @@ -49,6 +50,11 @@ LAVCFile::LAVCFile(wxString filename) int result = 0; fctx = NULL; +#ifdef WIN32 + wxFileName fn(filename); + filename = fn.GetShortPath(); +#endif + result = av_open_input_file(&fctx,filename.mb_str(wxConvLocal),NULL,0,NULL); if (result != 0) throw _T("Failed opening file.");