From 97d996f99563ebc1270aa4ea6788249421ded326 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Wed, 4 Apr 2007 20:42:44 +0000 Subject: [PATCH] Fixed all warnings while building on Linux, except for the ones on MatroskaParser.c and the ones about image conversion. Poke equinox for the later. Originally committed to SVN as r1008. --- FexTrackerSource/FexGenericFilter_Include.h | 8 ++++---- FexTrackerSource/FexTracker.h | 6 +++--- FexTrackerSource/FexTrackingFeature.cpp | 3 ++- aegisub/ass_style.cpp | 6 +++++- aegisub/audio_display.cpp | 6 +++--- aegisub/audio_provider.cpp | 8 ++++---- aegisub/audio_provider_lavc.cpp | 2 +- aegisub/audio_spectrum.cpp | 2 +- aegisub/auto4_auto3.cpp | 14 +++++++++++++- aegisub/auto4_base.cpp | 4 ++-- aegisub/auto4_base.h | 2 +- aegisub/auto4_lua.cpp | 2 ++ aegisub/auto4_lua_assfile.cpp | 2 +- aegisub/dialog_dummy_video.cpp | 2 +- aegisub/dialog_dummy_video.h | 2 +- aegisub/dialog_fonts_collector.cpp | 3 ++- aegisub/dialog_resample.cpp | 2 +- aegisub/dialog_search_replace.cpp | 5 +++-- aegisub/dialog_style_editor.cpp | 2 +- aegisub/gl_wrap.cpp | 3 ++- aegisub/mkv_wrap.cpp | 12 ++++++------ aegisub/posix/defines.h | 6 +++--- aegisub/spellchecker_hunspell.cpp | 2 +- aegisub/subs_edit_box.cpp | 2 +- aegisub/subs_edit_ctrl.cpp | 5 +++-- aegisub/subs_grid.cpp | 2 +- aegisub/video_display.cpp | 10 +++++----- aegisub/video_display_visual.cpp | 4 ++-- aegisub/video_frame.cpp | 8 +++++++- aegisub/video_provider_dummy.cpp | 2 +- aegisub/video_provider_lavc.cpp | 2 +- 31 files changed, 84 insertions(+), 55 deletions(-) diff --git a/FexTrackerSource/FexGenericFilter_Include.h b/FexTrackerSource/FexGenericFilter_Include.h index 2be68c120..7869b66f1 100644 --- a/FexTrackerSource/FexGenericFilter_Include.h +++ b/FexTrackerSource/FexGenericFilter_Include.h @@ -1,10 +1,10 @@ -// This file is part of FexGenericFilter and (C) 2006 by Hajo Krabbenhöft (tentacle) +// This file is part of FexGenericFilter and (C) 2006 by Hajo Krabbenh�t (tentacle) // All rights reserved but the aegisub project is allowed to use it. class FexFilter { public: FexFilter(); - ~FexFilter(); + virtual ~FexFilter(); virtual double Filter( double t ); @@ -14,7 +14,7 @@ public: class FexFilter_Gauss : public FexFilter { public: FexFilter_Gauss( double sigma ); - ~FexFilter_Gauss(); + virtual ~FexFilter_Gauss(); double Filter( double t ); @@ -26,7 +26,7 @@ public: class FexFilter_GaussDerivation : public FexFilter { public: FexFilter_GaussDerivation( double sigma ); - ~FexFilter_GaussDerivation(); + virtual ~FexFilter_GaussDerivation(); double Filter( double t ); diff --git a/FexTrackerSource/FexTracker.h b/FexTrackerSource/FexTracker.h index 14dd960e9..74a518419 100644 --- a/FexTrackerSource/FexTracker.h +++ b/FexTrackerSource/FexTracker.h @@ -1,4 +1,4 @@ -// This file is part of FexTracker and (C) 2006 by Hajo Krabbenhöft (tentacle) +// This file is part of FexTracker and (C) 2006 by Hajo Krabbenh�t (tentacle) // All rights reserved but the aegisub project is allowed to use it. @@ -25,15 +25,15 @@ class FEXTRACKER_API FexTrackerConfig public: inline FexTrackerConfig() : FeatureNumber(0), - EdgeDetectSigma(1.f), WindowX(3), WindowY(3), SearchRange(15), + DetectSmoothSigma(0.9f), + EdgeDetectSigma(1.f), MaxIterations(10), MinDeterminant(0.01f), MinDisplacement(0.1f), MaxResidue(10.f), IgnoreLightning(0), - DetectSmoothSigma(0.9f), MinDistanceSquare(100.f) {}; diff --git a/FexTrackerSource/FexTrackingFeature.cpp b/FexTrackerSource/FexTrackingFeature.cpp index 8ba87c655..bb4f4aa5c 100644 --- a/FexTrackerSource/FexTrackingFeature.cpp +++ b/FexTrackerSource/FexTrackingFeature.cpp @@ -1,4 +1,4 @@ -// This file is part of FexTracker and (C) 2006 by Hajo Krabbenhöft (tentacle) +// This file is part of FexTracker and (C) 2006 by Hajo Krabbenh�t (tentacle) // All rights reserved but the aegisub project is allowed to use it. // FexTrackingFeature.cpp: implementation of the FexTrackingFeature class. @@ -19,4 +19,5 @@ FexTrackingFeature::~FexTrackingFeature() { } + \ No newline at end of file diff --git a/aegisub/ass_style.cpp b/aegisub/ass_style.cpp index 118132dbb..5840ccfa4 100644 --- a/aegisub/ass_style.cpp +++ b/aegisub/ass_style.cpp @@ -74,7 +74,11 @@ void AssColor::Parse(const wxString value) { } outval=strtoul(ostr+oindex,0,ishex?16:10); - if (isneg) outval+=2147483648; //2^31 (MSB) + if (isneg) { + // Two lines to stop g++ from bitching + outval+=2147483647; //2^31 (MSB) + outval++; + } r = outval & 0xFF; g = (outval>>8) & 0xFF; diff --git a/aegisub/audio_display.cpp b/aegisub/audio_display.cpp index bc3723568..0b88bed66 100644 --- a/aegisub/audio_display.cpp +++ b/aegisub/audio_display.cpp @@ -691,7 +691,7 @@ void AudioDisplay::SetSamplesPercent(int percent,bool update,float pivot) { // Center scroll int oldSamples = samples; UpdateSamples(); - PositionSample += (oldSamples-samples)*w*pivot; + PositionSample += __int64((oldSamples-samples)*w*pivot); if (PositionSample < 0) PositionSample = 0; // Update @@ -715,7 +715,7 @@ void AudioDisplay::UpdateSamples() { int min = 8; if (total < min) total = min; int range = total-min; - samples = range*pow(samplesPercent/100.0,3)+min; + samples = int(range*pow(samplesPercent/100.0,3)+min); // Set position int length = w * samples; @@ -806,7 +806,7 @@ void AudioDisplay::UpdateScrollbar() { int page = w/12; int len = provider->GetNumSamples() / samples / 12; Position = PositionSample / samples; - ScrollBar->SetScrollbar(Position/12,page,len,page*0.7,true); + ScrollBar->SetScrollbar(Position/12,page,len,int(page*0.7),true); } diff --git a/aegisub/audio_provider.cpp b/aegisub/audio_provider.cpp index 8f6701ea6..f9ff8c12e 100644 --- a/aegisub/audio_provider.cpp +++ b/aegisub/audio_provider.cpp @@ -54,7 +54,7 @@ AudioProvider::AudioProvider() { // Destructor AudioProvider::~AudioProvider() { // Clear buffers - delete raw; + delete[] raw; } @@ -112,7 +112,7 @@ void AudioProvider::GetWaveForm(int *min,int *peak,__int64 start,int w,int h,int int needLen = n*channels*bytes_per_sample; if (raw) { if (raw_len < needLen) { - delete raw; + delete[] raw; raw = NULL; } } @@ -125,7 +125,7 @@ void AudioProvider::GetWaveForm(int *min,int *peak,__int64 start,int w,int h,int // Read raw samples unsigned char *raw_char = (unsigned char*) raw; GetAudio(raw,start,n); - int amplitude = h*scale; + int amplitude = int(h*scale); // Calculate waveform for (int i=0;ifctx->nb_streams; i++) { + for (int i = 0; i < lavcfile->fctx->nb_streams; i++) { codecContext = lavcfile->fctx->streams[i]->codec; if (codecContext->codec_type == CODEC_TYPE_AUDIO) { stream = lavcfile->fctx->streams[i]; diff --git a/aegisub/audio_spectrum.cpp b/aegisub/audio_spectrum.cpp index 4ccf08276..2c01e9574 100644 --- a/aegisub/audio_spectrum.cpp +++ b/aegisub/audio_spectrum.cpp @@ -142,7 +142,7 @@ public: if (i >= start && i-start <= length) { // Determine which sub-cache this line resides in size_t subcache = (i-start) / subcache_length; - assert(subcache >= 0 && subcache < sub_caches.size()); + assert(subcache < sub_caches.size()); if (!sub_caches[subcache]) { if (subcaches_are_final) { diff --git a/aegisub/auto4_auto3.cpp b/aegisub/auto4_auto3.cpp index c3f80e71e..45068a767 100644 --- a/aegisub/auto4_auto3.cpp +++ b/aegisub/auto4_auto3.cpp @@ -278,6 +278,8 @@ namespace Automation4 { ((wxChoice*)control.control)->Insert(_T(""), 0); break; + case COK_INVALID: + break; } if (opt->kind != COK_LABEL && opt->kind != COK_BOOL) { @@ -462,6 +464,8 @@ namespace Automation4 { opt.kind = COK_INVALID; } break; + case COK_INVALID: + break; } opt.value = opt.default_val; lua_pop(L, 1); @@ -555,6 +559,10 @@ continue_invalid_option: case COK_STYLE: ctl->option->value.stringval = ((wxChoice*)ctl->control)->GetStringSelection(); break; + + case COK_LABEL: + case COK_INVALID: + break; } } } @@ -635,6 +643,10 @@ continue_invalid_option: case COK_COLOUR: opt->value.colourval.Parse(optval); break; + + case COK_LABEL: + case COK_INVALID: + break; } } } @@ -1162,8 +1174,8 @@ continue_invalid_option: Auto3Script::Auto3Script(const wxString &filename) : Script(filename) - , L(0) , filter(0) + , L(0) { try { Create(); diff --git a/aegisub/auto4_base.cpp b/aegisub/auto4_base.cpp index 336c38b41..b1a98dec2 100644 --- a/aegisub/auto4_base.cpp +++ b/aegisub/auto4_base.cpp @@ -332,11 +332,11 @@ namespace Automation4 { ProgressSink::ProgressSink(wxWindow *parent) : wxDialog(parent, -1, _T("Automation"), wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER) + , debug_visible(false) + , data_updated(false) , cancelled(false) , has_inited(false) , script_finished(false) - , debug_visible(false) - , data_updated(false) { // make the controls progress_display = new wxGauge(this, -1, 1000, wxDefaultPosition, wxSize(300, 20)); diff --git a/aegisub/auto4_base.h b/aegisub/auto4_base.h index 490c03a65..202fe7df5 100644 --- a/aegisub/auto4_base.h +++ b/aegisub/auto4_base.h @@ -252,8 +252,8 @@ namespace Automation4 { void SetTitle(const wxString &_title); void AddDebugOutput(const wxString &msg); - volatile bool script_finished; volatile bool has_inited; + volatile bool script_finished; DECLARE_EVENT_TABLE() }; diff --git a/aegisub/auto4_lua.cpp b/aegisub/auto4_lua.cpp index 03998cd9d..095b896c8 100644 --- a/aegisub/auto4_lua.cpp +++ b/aegisub/auto4_lua.cpp @@ -638,6 +638,7 @@ namespace Automation4 { ps->ShowModal(); wxThread::ExitCode code = call.Wait(); + (void) code; //if (code) ThrowError(); delete ps; @@ -709,6 +710,7 @@ namespace Automation4 { ps->ShowModal(); wxThread::ExitCode code = call.Wait(); + (void) code; //if (code) ThrowError(); delete ps; diff --git a/aegisub/auto4_lua_assfile.cpp b/aegisub/auto4_lua_assfile.cpp index 3868b58c1..2989917b4 100644 --- a/aegisub/auto4_lua_assfile.cpp +++ b/aegisub/auto4_lua_assfile.cpp @@ -710,7 +710,7 @@ namespace Automation4 { int n = lua_gettop(L); - laf->GetAssEntry(lua_tonumber(L, 1)-1); + laf->GetAssEntry(int(lua_tonumber(L, 1)-1)); for (int i = 2; i <= n; i++) { lua_pushvalue(L, i); diff --git a/aegisub/dialog_dummy_video.cpp b/aegisub/dialog_dummy_video.cpp index 6588b72f9..a8810e2b2 100644 --- a/aegisub/dialog_dummy_video.cpp +++ b/aegisub/dialog_dummy_video.cpp @@ -229,7 +229,7 @@ void DialogDummyVideo::UpdateLengthDisplay() int lengthval; if (!length_display) return; if ((fps->GetValue().ToDouble(&fpsval)) && (lengthval = length->GetValue()) && fpsval > 0 && lengthval > 0) { - int tt = lengthval / fpsval * 1000; // frames / (frames/seconds) * 1000 = milliseconds + int tt = int(lengthval / fpsval * 1000); // frames / (frames/seconds) * 1000 = milliseconds // 32 bit signed int can hold almost 600 positive hours when counting milliseconds, ASS allows at most just below 10 hours, so we're safe int ms, s, m, h; ms = tt % 1000; tt /= 1000; diff --git a/aegisub/dialog_dummy_video.h b/aegisub/dialog_dummy_video.h index e6ec7f85c..029437979 100644 --- a/aegisub/dialog_dummy_video.h +++ b/aegisub/dialog_dummy_video.h @@ -81,4 +81,4 @@ enum { }; -#endif \ No newline at end of file +#endif diff --git a/aegisub/dialog_fonts_collector.cpp b/aegisub/dialog_fonts_collector.cpp index a4517e833..04bb2e9dd 100644 --- a/aegisub/dialog_fonts_collector.cpp +++ b/aegisub/dialog_fonts_collector.cpp @@ -375,7 +375,8 @@ wxThread::ExitCode FontsCollectorThread::Entry() { // Collect void FontsCollectorThread::Collect() { // Prepare - bool attaching = collector->AttachmentCheck->IsChecked(); + bool attaching; + attaching = collector->AttachmentCheck->IsChecked(); bool zipOut = collector->ArchiveCheck->IsChecked(); // Make sure there is a separator at the end diff --git a/aegisub/dialog_resample.cpp b/aegisub/dialog_resample.cpp index d57f5e177..a6ac3f2cb 100644 --- a/aegisub/dialog_resample.cpp +++ b/aegisub/dialog_resample.cpp @@ -142,7 +142,7 @@ void DialogResample::ResampleTags (wxString name,int n,AssOverrideParameter *cur curParam->SetFloat(curParam->AsFloat() * resizer); } if (curType == VARDATA_INT) { - curParam->SetInt(double(curParam->AsInt()) * resizer + 0.5); + curParam->SetInt(int(double(curParam->AsInt()) * resizer + 0.5)); } } diff --git a/aegisub/dialog_search_replace.cpp b/aegisub/dialog_search_replace.cpp index 0922047b7..c7ba0668e 100644 --- a/aegisub/dialog_search_replace.cpp +++ b/aegisub/dialog_search_replace.cpp @@ -356,8 +356,9 @@ void SearchReplaceEngine::ReplaceNext(bool DoReplace) { else { wxString src = Text->Mid(tempPos); if (!matchCase) src.MakeLower(); - pos = src.Find(LookFor); - if (pos != -1) { + int tempPos = src.Find(LookFor); + if (tempPos != -1) { + pos = tempPos; pos += tempPos; found = true; matchLen = LookFor.Length(); diff --git a/aegisub/dialog_style_editor.cpp b/aegisub/dialog_style_editor.cpp index 1452eef87..ea701ab6e 100644 --- a/aegisub/dialog_style_editor.cpp +++ b/aegisub/dialog_style_editor.cpp @@ -469,7 +469,7 @@ void DialogStyleEditor::Apply (bool apply,bool close) { /////////////////// // Choose font box void DialogStyleEditor::OnChooseFont (wxCommandEvent &event) { - wxFont oldfont (work->fontsize, wxFONTFAMILY_DEFAULT, (work->italic?wxFONTSTYLE_ITALIC:wxFONTSTYLE_NORMAL), (work->bold?wxFONTWEIGHT_BOLD:wxFONTWEIGHT_NORMAL), work->underline, work->font, wxFONTENCODING_DEFAULT); + wxFont oldfont (int(work->fontsize), wxFONTFAMILY_DEFAULT, (work->italic?wxFONTSTYLE_ITALIC:wxFONTSTYLE_NORMAL), (work->bold?wxFONTWEIGHT_BOLD:wxFONTWEIGHT_NORMAL), work->underline, work->font, wxFONTENCODING_DEFAULT); wxFont newfont = wxGetFontFromUser(this,oldfont); if (newfont.Ok()) { FontName->SetValue(newfont.GetFaceName()); diff --git a/aegisub/gl_wrap.cpp b/aegisub/gl_wrap.cpp index 82025cbd2..1f97bb2f7 100644 --- a/aegisub/gl_wrap.cpp +++ b/aegisub/gl_wrap.cpp @@ -51,7 +51,8 @@ void* glGetProc(const char *str) { return wglGetProcAddress(str); } #ifdef __WXMAC_OSX__ void* glGetProc(const char *str) { return aglGetProcAddress(str); } #else -void* glGetProc(const char *str) { return glXGetProcAddress((const GLubyte *)str); } +//void* glGetProc(const char *str) { return glXGetProcAddress((const GLubyte *)str); } +#define glGetProc(a) glXGetProcAddress((const GLubyte *)(a)) #endif #endif diff --git a/aegisub/mkv_wrap.cpp b/aegisub/mkv_wrap.cpp index 327ff75a1..4358060a8 100644 --- a/aegisub/mkv_wrap.cpp +++ b/aegisub/mkv_wrap.cpp @@ -163,7 +163,7 @@ void MatroskaWrapper::Parse() { mkv_SetTrackMask(file, ~(1 << track)); // Progress bar - int totalTime = double(segInfo->Duration) / timecodeScale; + int totalTime = int(double(segInfo->Duration) / timecodeScale); volatile bool canceled = false; DialogProgress *progress = new DialogProgress(NULL,_("Parsing Matroska"),&canceled,_("Reading keyframe and timecode data from Matroska file."),0,totalTime); progress->Show(); @@ -184,7 +184,7 @@ void MatroskaWrapper::Parse() { } // Update progress - progress->SetProgress(curTime,totalTime); + progress->SetProgress(int(curTime),totalTime); } // Clean up progress @@ -261,8 +261,8 @@ void MatroskaWrapper::SetToTimecodes(FrameRate &target) { // Constant framerate if (isCFR) { - if (abs(estimateCFR - 23.976) < 0.01) estimateCFR = 24000.0 / 1001.0; - if (abs(estimateCFR - 29.97) < 0.01) estimateCFR = 30000.0 / 1001.0; + if (fabs(estimateCFR - 23.976) < 0.01) estimateCFR = 24000.0 / 1001.0; + if (fabs(estimateCFR - 29.97) < 0.01) estimateCFR = 30000.0 / 1001.0; target.SetCFR(estimateCFR); } @@ -382,7 +382,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) { long int order = -1; // Progress bar - int totalTime = double(segInfo->Duration) / timecodeScale; + int totalTime = int(double(segInfo->Duration) / timecodeScale); volatile bool canceled = false; DialogProgress *progress = new DialogProgress(NULL,_("Parsing Matroska"),&canceled,_("Reading subtitles from Matroska file."),0,totalTime); progress->Show(); @@ -451,7 +451,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) { } // Update progress bar - progress->SetProgress(double(startTime) / 1000000.0,totalTime); + progress->SetProgress(int(double(startTime) / 1000000.0),totalTime); } // Insert into file diff --git a/aegisub/posix/defines.h b/aegisub/posix/defines.h index a59ac8f9c..726211774 100644 --- a/aegisub/posix/defines.h +++ b/aegisub/posix/defines.h @@ -37,14 +37,14 @@ typedef uint64_t __uint64; #error no audio system available #endif -#define USE_DIRECTSHOW 0 -#define USE_DIRECTSOUND 0 -#define USE_HUNSPELL 0 +//#define USE_HUNSPELL 0 #ifndef USE_LAVC #define USE_LAVC 0 #endif #define USE_PRS 0 +#ifndef USE_FEXTRACKER #define USE_FEXTRACKER 1 +#endif #ifndef USE_LIBSSA #define USE_LIBSSA 0 #endif diff --git a/aegisub/spellchecker_hunspell.cpp b/aegisub/spellchecker_hunspell.cpp index b55deda2c..097d52d67 100644 --- a/aegisub/spellchecker_hunspell.cpp +++ b/aegisub/spellchecker_hunspell.cpp @@ -196,7 +196,7 @@ wxArrayString HunspellSpellChecker::GetLanguageList() { // For each dictionary match, see if it can find the corresponding .aff for (unsigned int i=0;ifont); - startfont.SetPointSize(style->fontsize); + startfont.SetPointSize(int(style->fontsize)); startfont.SetWeight(style->bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL); startfont.SetStyle(style->italic ? wxFONTSTYLE_ITALIC : wxFONTSTYLE_NORMAL); startfont.SetUnderlined(style->underline); diff --git a/aegisub/subs_edit_ctrl.cpp b/aegisub/subs_edit_ctrl.cpp index 09b1ad46b..ba7524c02 100644 --- a/aegisub/subs_edit_ctrl.cpp +++ b/aegisub/subs_edit_ctrl.cpp @@ -472,7 +472,7 @@ void SubsTextEditCtrl::UpdateCallTip() { // No tag available int textLen = text.Length(); unsigned int posInTag = pos - tagStart; - if (tagStart+len > textLen || len <= 0 || tagStart < 0 || posInTag < 0) { + if (tagStart+len > textLen || len <= 0 || tagStart < 0) { CallTipCancel(); return; } @@ -828,7 +828,8 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) { // Build menu for (int i=0;iSetFont(font); #endif diff --git a/aegisub/subs_grid.cpp b/aegisub/subs_grid.cpp index c40cdef0e..778ebfb8d 100644 --- a/aegisub/subs_grid.cpp +++ b/aegisub/subs_grid.cpp @@ -659,7 +659,7 @@ void SubtitlesGrid::OnAudioClip(wxCommandEvent &event) { num_samples = provider->GetNumSamples(); - for(int i=0;i!=sel.GetCount();i++) { + for(unsigned int i=0;i!=sel.GetCount();i++) { cur = GetDialogue(sel[i]); temp = audioDisplay->GetSampleAtMS(cur->Start.GetMS()); diff --git a/aegisub/video_display.cpp b/aegisub/video_display.cpp index 227796772..6b3b6763f 100644 --- a/aegisub/video_display.cpp +++ b/aegisub/video_display.cpp @@ -173,14 +173,14 @@ void VideoDisplay::Render() { // Window is wider than video, blackbox left/right if (thisAr - vidAr > 0.01f) { - int delta = (w-vidAr*h); + int delta = int(w-vidAr*h); dx1 += delta/2; dx2 -= delta; } // Video is wider than window, blackbox top/bottom else if (vidAr - thisAr > 0.01f) { - int delta = (h-w/vidAr); + int delta = int(h-w/vidAr); dy1 += delta/2; dy2 -= delta; } @@ -271,9 +271,9 @@ void VideoDisplay::UpdateSize() { if (!IsShownOnScreen()) return; // Get size - if (con->GetAspectRatioType() == 0) w = con->GetWidth() * zoomValue; - else w = con->GetHeight() * zoomValue * con->GetAspectRatioValue(); - h = con->GetHeight() * zoomValue; + if (con->GetAspectRatioType() == 0) w = int(con->GetWidth() * zoomValue); + else w = int(con->GetHeight() * zoomValue * con->GetAspectRatioValue()); + h = int(con->GetHeight() * zoomValue); int _w,_h; if (w <= 1 || h <= 1) return; locked = true; diff --git a/aegisub/video_display_visual.cpp b/aegisub/video_display_visual.cpp index 8fb3081ed..e7296ee1a 100644 --- a/aegisub/video_display_visual.cpp +++ b/aegisub/video_display_visual.cpp @@ -284,8 +284,8 @@ void VideoDisplayVisual::DrawOverlay() { int fx = int(cos(angle)*oRadius); int fy = -int(sin(angle)*oRadius); DrawLine(0,0,fx,fy); - int mdx = cos(rz*3.1415926536/180.0)*20; - int mdy = -sin(rz*3.1415926536/180.0)*20; + int mdx = int(cos(rz*3.1415926536/180.0)*20); + int mdy = int(-sin(rz*3.1415926536/180.0)*20); DrawLine(-mdx,-mdy,mdx,mdy); } diff --git a/aegisub/video_frame.cpp b/aegisub/video_frame.cpp index 2b26a5612..6e34432cb 100644 --- a/aegisub/video_frame.cpp +++ b/aegisub/video_frame.cpp @@ -241,7 +241,13 @@ void AegiVideoFrame::GetFloat(float *buffer) const { if (flipped) src = data[0] + (h-y-1)*pitch[0]; // I think that it requires flipped data - amz else src = data[0] + y*pitch[0]; for (unsigned int x=0;xfctx->nb_streams;i++) { + for (int i=0;ifctx->nb_streams;i++) { codecContext = lavcfile->fctx->streams[i]->codec; if (codecContext->codec_type == CODEC_TYPE_VIDEO) { stream = lavcfile->fctx->streams[i];