# HG changeset patch # User ib # Date 1317302792 0 # Node ID 54becc464788a6331f5782fd0b057f1b7a8cc626 # Parent 31fdbcd6de70cbb35f7ec8280db26428e9d4c77d Set MPlayer filename in uiSetFileName(). This ensures that filename always points to guiInfo.Filename (the GUI filename). If guiInit() is called without filename being set, leave it that way. (This applies if the GUI should not start playing immediately.) diff -r 31fdbcd6de70 -r 54becc464788 gui/interface.c --- a/gui/interface.c Thu Sep 29 11:19:23 2011 +0000 +++ b/gui/interface.c Thu Sep 29 13:26:32 2011 +0000 @@ -233,8 +233,10 @@ uiSubRender = 1; - if (plCurrent && !filename) + if (plCurrent && !filename) { uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE); + filename = NULL; // don't start playing + } if (subdata) setdup(&guiInfo.SubtitleFilename, subdata->filename); diff -r 31fdbcd6de70 -r 54becc464788 gui/ui/actions.c --- a/gui/ui/actions.c Thu Sep 29 11:19:23 2011 +0000 +++ b/gui/ui/actions.c Thu Sep 29 13:26:32 2011 +0000 @@ -229,7 +229,9 @@ else setddup(&guiInfo.Filename, dir, name); + filename = guiInfo.Filename; guiInfo.StreamType = type; + nfree(guiInfo.AudioFilename); nfree(guiInfo.SubtitleFilename); } diff -r 31fdbcd6de70 -r 54becc464788 gui/win32/interface.c --- a/gui/win32/interface.c Thu Sep 29 11:19:23 2011 +0000 +++ b/gui/win32/interface.c Thu Sep 29 13:26:32 2011 +0000 @@ -340,7 +340,9 @@ else setddup(&guiInfo.Filename, dir, name); + filename = guiInfo.Filename; guiInfo.StreamType = type; + nfree(guiInfo.AudioFilename); nfree(guiInfo.SubtitleFilename); }