diff --git a/core/dialog_export.cpp b/core/dialog_export.cpp index 73d0ae013..7285f1ad1 100644 --- a/core/dialog_export.cpp +++ b/core/dialog_export.cpp @@ -182,7 +182,7 @@ END_EVENT_TABLE() // Process start void DialogExport::OnProcess(wxCommandEvent &event) { // Get destination - wxString filename = wxFileSelector(_("Export subtitles file"),_T(""),_T(""),_T(""),_T("All Supported Types (*.ass,*.ssa,*.srt,*.prs)|*.ass;*.ssa;*.srt;*.prs|Advanced Substation Alpha (*.ass)|*.ass|Substation Alpha (*.ssa)|*.ssa|SubRip (*.srt)|*.srt|Pre-Rendered Subtitles (*.prs)|*.prs"),wxSAVE | wxOVERWRITE_PROMPT); + wxString filename = wxFileSelector(_("Export subtitles file"),_T(""),_T(""),_T(""),_T("All Supported Types (*.ass,*.ssa,*.srt,*.prs)|*.ass;*.ssa;*.srt;*.prs|Advanced Substation Alpha (*.ass)|*.ass|Substation Alpha (*.ssa)|*.ssa|SubRip (*.srt)|*.srt|Pre-Rendered Subtitles (*.prs)|*.prs"),wxSAVE | wxOVERWRITE_PROMPT,this); if (filename.empty()) return; // Add filters diff --git a/core/subtitle_format_srt.cpp b/core/subtitle_format_srt.cpp index 75a6c2bc2..547c879b4 100644 --- a/core/subtitle_format_srt.cpp +++ b/core/subtitle_format_srt.cpp @@ -200,12 +200,13 @@ void SRTSubtitleFormat::DialogueToSRT(AssDialogue *current,std::list: // Converts whole file to SRT void SRTSubtitleFormat::ConvertToSRT () { using std::list; - list::iterator next; - list::iterator prev = Line->end(); // Sort lines Line->sort(LessByPointedToValue()); + list::iterator next; + list::iterator prev = Line->end(); + // Process lines bool notfirst = false; for (list::iterator cur=Line->begin();cur!=Line->end();cur=next) { diff --git a/core/vfr.cpp b/core/vfr.cpp index 9775bccbf..b7489a1a0 100644 --- a/core/vfr.cpp +++ b/core/vfr.cpp @@ -278,7 +278,7 @@ int FrameRate::PFrameAtTime(int ms,bool useceil) { // Get for constant frame rate if (FrameRateType == CFR) { - double value = double(ms)/1000.0 * AverageFrameRate; + double value = double(ms) * AverageFrameRate / 1000.0; if (useceil) return ceil(value); else return floor(value); }