Fixed almost a hundred warning messages issued with /W4 in VC++ (with warning 4100 disabled)

Originally committed to SVN as r891.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-24 03:54:32 +00:00
parent 3ab9822ed3
commit 297dbd74b8
29 changed files with 93 additions and 75 deletions

View file

@ -41,7 +41,7 @@ FEXTRACKER_API void LoadMovement( FexMovement* me, const wchar_t* Filename )
FILE *fi = _wfopen( Filename, L"rt" );
if( !fi ) return;
int CurFeat = -1;
//int CurFeat = -1;
char Line[512];
while( !feof(fi) )
{

View file

@ -240,7 +240,7 @@ static void myvsnprintf_uint_impl(char **pdest,char *de,int width,int zero,
int rem = (int)(val % base);
val = val / base;
*--np = rem < 10 ? rem + '0' : rem - 10 + letter;
*--np = (char) (rem < 10 ? rem + '0' : rem - 10 + letter);
}
rw = (int)(tmp - np + sizeof(tmp) - 1);
@ -290,7 +290,7 @@ static void myvsnprintf_int(char **pdest,char *de,int width,int zero,
static void myvsnprintf(char *dest,unsigned dsize,const char *fmt,va_list ap) {
// s,d,x,u,ll
char *de = dest + dsize - 1;
int state = 0, width, zero, neg, ll;
int state = 0, width=0, zero=0, neg=0, ll=0;
if (dsize <= 1) {
if (dsize > 0)
@ -687,7 +687,7 @@ static ulonglong readVLUIntImp(MatroskaFile *mf,int *mask) {
c = readch(mf);
if (c == EOF)
return EOF;
return (ulonglong)EOF;
if (c == 0)
errorjmp(mf,"Invalid first byte of EBML integer: 0");
@ -762,6 +762,7 @@ static MKFLOAT readFloat(MatroskaFile *mf,unsigned int len) {
#ifdef MATROSKA_INTEGER_ONLY
MKFLOAT f;
int shift;
f.v = 0;
#else
union {
unsigned int ui;
@ -769,6 +770,9 @@ static MKFLOAT readFloat(MatroskaFile *mf,unsigned int len) {
float f;
double d;
} u;
ui = 0;
d = 0;
ull = 0;
#endif
if (len!=4 && len!=8)
@ -1246,7 +1250,7 @@ static void parseTrackEntry(MatroskaFile *mf,ulonglong toplen) {
ulonglong v;
char *cp = NULL, *cs = NULL;
size_t cplen = 0, cslen = 0, cpadd = 0;
unsigned CompScope, num_comp = 0;
unsigned CompScope=0, num_comp = 0;
if (mf->nTracks >= MAX_TRACKS)
errorjmp(mf,"Too many tracks.");
@ -1431,11 +1435,11 @@ static void parseTrackEntry(MatroskaFile *mf,ulonglong toplen) {
if (inflateInit(&zs) != Z_OK)
errorjmp(mf, "inflateInit failed");
zs.next_in = cp;
zs.next_in = (Bytef*) cp;
zs.avail_in = cplen;
do {
zs.next_out = tmp;
zs.next_out = (Bytef*) tmp;
zs.avail_out = sizeof(tmp);
code = inflate(&zs, Z_NO_FLUSH);
@ -1449,9 +1453,9 @@ static void parseTrackEntry(MatroskaFile *mf,ulonglong toplen) {
inflateReset(&zs);
zs.next_in = cp;
zs.next_in = (Bytef*) cp;
zs.avail_in = cplen;
zs.next_out = ncp;
zs.next_out = (Bytef*) ncp;
zs.avail_out = ncplen;
if (inflate(&zs, Z_FINISH) != Z_STREAM_END)
@ -2059,7 +2063,7 @@ static void parseSegment(MatroskaFile *mf,ulonglong toplen) {
}
static void parseBlockAdditions(MatroskaFile *mf, ulonglong toplen, ulonglong timecode, unsigned track) {
ulonglong add_id = 1, add_pos, add_len;
ulonglong add_id = 1, add_pos=0, add_len=0;
unsigned char have_add;
FOREACH(mf, toplen)
@ -2091,10 +2095,10 @@ static void parseBlockAdditions(MatroskaFile *mf, ulonglong toplen, ulonglong ti
}
static void parseBlockGroup(MatroskaFile *mf,ulonglong toplen,ulonglong timecode, int blockex) {
ulonglong v;
ulonglong v=0;
ulonglong duration = 0;
ulonglong dpos;
unsigned add_id = 0;
ulonglong dpos=0;
//unsigned add_id = 0;
struct QueueEntry *qe,*qf = NULL;
unsigned char have_duration = 0, have_block = 0;
unsigned char gap = 0;
@ -2151,10 +2155,10 @@ found:
errorjmp(mf,"Unexpected EOF while reading Block flags");
if (blockex)
ref = !(c & 0x80);
ref = (unsigned char)(!(c & 0x80));
gap = c & 0x1;
lacing = (c >> 1) & 3;
gap = (unsigned char)(c & 0x1);
lacing = (unsigned char)((c >> 1) & 3);
if (lacing) {
c = readch(mf);
@ -3259,7 +3263,7 @@ int cs_ReadData(CompressedStream *cs,char *buffer,unsigned bufsize)
cs->decoded_ptr += todo;
} else {
/* setup output buffer */
cs->zs.next_out = cs->decoded_buffer;
cs->zs.next_out = (Bytef*) cs->decoded_buffer;
cs->zs.avail_out = sizeof(cs->decoded_buffer);
/* try to read more data */
@ -3273,7 +3277,7 @@ int cs_ReadData(CompressedStream *cs,char *buffer,unsigned bufsize)
return -1;
}
cs->zs.next_in = cs->frame_buffer;
cs->zs.next_in = (Bytef*) cs->frame_buffer;
cs->zs.avail_in = todo;
cs->frame_pos += todo;

View file

@ -1124,7 +1124,6 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
__int64 y = event.GetY();
bool karMode = karaoke->enabled;
bool shiftDown = event.m_shiftDown;
bool ctrlDown = event.m_controlDown;
int timelineHeight = Options.AsBool(_T("Audio Draw Timeline")) ? 20 : 0;
// Leaving event

View file

@ -264,7 +264,7 @@ bool AudioKaraoke::ParseDialogue(AssDialogue *curDiag) {
// Last syllable
if (foundBlock) syllables.push_back(temp);
return foundBlock;
curDiag->ClearBlocks();
//curDiag->ClearBlocks();
}
@ -380,7 +380,7 @@ void AudioKaraoke::OnPaint(wxPaintEvent &event) {
}
}
if (splitting && split_cursor_syl == i /*&& split_cursor_x > 0*/) {
if (splitting && split_cursor_syl == (signed)i /*&& split_cursor_x > 0*/) {
dc.SetPen(*wxRED);
dc.DrawLine(dx+4+split_cursor_x, 0, dx+4+split_cursor_x, h);
dc.SetPen(wxPen(wxColour(0,0,0)));
@ -411,7 +411,7 @@ void AudioKaraoke::OnSize(wxSizeEvent &event) {
void AudioKaraoke::OnMouse(wxMouseEvent &event) {
// Get coordinates
int x = event.GetX();
int y = event.GetY();
//int y = event.GetY();
bool shift = event.m_shiftDown;
// Syllable selection mode

View file

@ -361,7 +361,7 @@ DirectSoundPlayerThread::~DirectSoundPlayerThread() {
// Thread entry point
wxThread::ExitCode DirectSoundPlayerThread::Entry() {
// Variables
unsigned long int playPos,endPos,bufSize;
unsigned long int playPos=0,endPos=0,bufSize=0;
bool playing;
// Wait for notification

View file

@ -248,7 +248,7 @@ namespace Automation4 {
delete config_dialog;
config_dialog = 0;
}
if (config_dialog = GenerateConfigDialog(parent)) {
if ((config_dialog = GenerateConfigDialog(parent)) != NULL) {
return config_dialog->GetWindow(parent);
} else {
return 0;

View file

@ -494,7 +494,7 @@ namespace Automation4 {
// create an array-style table with an integer vector in it
// leave the new table on top of the stack
lua_newtable(L);
for (int i = 0; i != ints.size(); ++i) {
for (size_t i = 0; i != ints.size(); ++i) {
lua_pushinteger(L, ints[i]+1);
lua_rawseti(L, -2, i+1);
}
@ -516,6 +516,7 @@ namespace Automation4 {
wxString _description(lua_tostring(L, 2), wxConvUTF8);
LuaFeatureMacro *macro = new LuaFeatureMacro(_name, _description, L);
(void)macro;
return 0;
}
@ -553,12 +554,14 @@ namespace Automation4 {
// prepare function call
LuaAssFile *subsobj = new LuaAssFile(L, subs, false, false);
(void) subsobj;
CreateIntegerArray(selected); // selected items
lua_pushinteger(L, -1); // active line
// do call
LuaThreadedCall call(L, 3, 1);
wxThread::ExitCode code = call.Wait();
(void) code;
// get result
bool result = !!lua_toboolean(L, -1);
@ -574,6 +577,7 @@ namespace Automation4 {
// prepare function call
LuaAssFile *subsobj = new LuaAssFile(L, subs, true, true);
(void) subsobj;
CreateIntegerArray(selected); // selected items
lua_pushinteger(L, -1); // active line
@ -625,6 +629,7 @@ namespace Automation4 {
int _merit = lua_tointeger(L, 3);
LuaFeatureFilter *filter = new LuaFeatureFilter(_name, _description, _merit, L);
(void) filter;
return 0;
}
@ -636,6 +641,7 @@ namespace Automation4 {
// prepare function call
// subtitles (undo doesn't make sense in exported subs, in fact it'll totally break the undo system)
LuaAssFile *subsobj = new LuaAssFile(L, subs, true/*allow modifications*/, false/*disallow undo*/);
(void) subsobj;
// config
if (has_config && config_dialog) {
assert(config_dialog->LuaReadBack(L) == 1);
@ -665,6 +671,7 @@ namespace Automation4 {
// prepare function call
// subtitles (don't allow any modifications during dialog creation, ideally the subs aren't even accessed)
LuaAssFile *subsobj = new LuaAssFile(L, AssFile::top, false/*allow modifications*/, false/*disallow undo*/);
(void) subsobj;
// stored options
lua_newtable(L); // TODO, nothing for now

View file

@ -180,8 +180,9 @@ void DialogKanjiTimer::OnStart(wxCommandEvent &event) {
else if (SourceStyle->GetValue() == DestStyle->GetValue())
wxMessageBox(_("The source and destination styles must be different."),_("Error"),wxICON_EXCLAMATION | wxOK);
else {
OnSkipDest((wxCommandEvent)NULL);
OnSkipSource((wxCommandEvent)NULL);
wxCommandEvent blank;
OnSkipDest(blank);
OnSkipSource(blank);
DestText->SetFocus();
}
}
@ -306,11 +307,10 @@ void DialogKanjiTimer::OnSkipDest(wxCommandEvent &event) {
GroupsList->DeleteAllItems();
int index = ListIndexFromStyleandIndex(DestStyle->GetValue(), DestIndex);
if (index != -1) {
AssDialogue *line = grid->GetDialogue(index);
DestText->ChangeValue(grid->GetDialogue(index)->GetStrippedText());
SetSelected();
DestText->SetFocus();
DestIndex++;
}
@ -318,8 +318,9 @@ void DialogKanjiTimer::OnSkipDest(wxCommandEvent &event) {
void DialogKanjiTimer::OnGoBack(wxCommandEvent &event) {
DestIndex-=2;
SourceIndex-=2;
OnSkipDest((wxCommandEvent)NULL);
OnSkipSource((wxCommandEvent)NULL);
wxCommandEvent tmpEvent;
OnSkipDest(tmpEvent);
OnSkipSource(tmpEvent);
}
void DialogKanjiTimer::OnAccept(wxCommandEvent &event) {
if (RegroupTotalLen==0)
@ -358,18 +359,20 @@ void DialogKanjiTimer::OnAccept(wxCommandEvent &event) {
grid->ass->FlagAsModified();
grid->CommitChanges();
OnSkipDest((wxCommandEvent)NULL);
OnSkipSource((wxCommandEvent)NULL);
wxCommandEvent evt;
OnSkipDest(evt);
OnSkipSource(evt);
}
}
void DialogKanjiTimer::OnKeyDown(wxKeyEvent &event) {
wxCommandEvent evt;
switch(event.GetKeyCode()) {
case WXK_ESCAPE :
//this->EndModal(0);
OnClose((wxCommandEvent)NULL);
OnClose(evt);
break;
case WXK_BACK :
OnUnlink((wxCommandEvent)NULL);
OnUnlink(evt);
break;
case WXK_RIGHT : //inc dest selection len
if (DestText->GetStringSelection().Len()!=DestText->GetValue().Len())
@ -390,17 +393,18 @@ void DialogKanjiTimer::OnKeyDown(wxKeyEvent &event) {
}
break;
case WXK_RETURN :
OnKeyEnter((wxCommandEvent)NULL);
OnKeyEnter(evt);
break;
default :
event.Skip();
}
}
void DialogKanjiTimer::OnKeyEnter(wxCommandEvent &event) {
wxCommandEvent evt;
if (SourceText->GetValue().Len()==0&&RegroupTotalLen!=0)
this->OnAccept((wxCommandEvent)NULL);
this->OnAccept(evt);
else if (SourceText->GetStringSelection().Len()!=0)
this->OnLink((wxCommandEvent)NULL);
this->OnLink(evt);
}
void DialogKanjiTimer::OnMouseEvent(wxMouseEvent &event) {
if (event.LeftDown()) DestText->SetFocus();
@ -457,7 +461,6 @@ void DialogKanjiTimer::SetSelected() {
//Try some interpolation for kanji. If we find a hiragana we know after this,
// then we may be able to figure this one out.
wxString NextSGroup = RegroupSourceText[GetSourceArrayPos(false)];
int highlight=0;
for(std::list<KanaEntry>::iterator iter = kt->entries.begin(); iter != kt->entries.end(); iter++) {
KanaEntry ke = *iter;
@ -558,7 +561,7 @@ int DialogKanjiTimer::ListIndexFromStyleandIndex(wxString StyleName, int Occuran
AssDialogue *line;
int index = 0;
int occindex = 0;
while(line=grid->GetDialogue(index)) {
while((line=grid->GetDialogue(index)) != NULL) {
if (line->Style == StyleName) {
if (occindex == Occurance)
return index;

View file

@ -50,7 +50,7 @@ DialogProgress::DialogProgress(wxWindow *parent,wxString title,volatile bool *ca
// Gauge
gauge = new wxGauge(this, -1, max, wxDefaultPosition, wxSize(300,20), wxGA_HORIZONTAL);
wxButton *cancelButton;
wxButton *cancelButton = NULL;
if (cancel) cancelButton = new wxButton(this,wxID_CANCEL);
text = new wxStaticText(this, -1, message, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxST_NO_AUTORESIZE);

View file

@ -338,7 +338,7 @@ void SearchReplaceEngine::ReplaceNext(bool DoReplace) {
int start = curLine;
int nrows = grid->GetRows();
bool found = false;
wxString *Text;
wxString *Text = NULL;
size_t tempPos;
int regFlags = wxRE_ADVANCED;
if (!matchCase) {

View file

@ -570,7 +570,6 @@ void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) {
wxArrayInt selections;
AssStyle *temp = new AssStyle;
int n = StorageList->GetSelections(selections);
*temp = *(styleStorageMap.at(selections[0]));
wxString newName = _("Copy of ");
newName += temp->name;
@ -594,7 +593,6 @@ void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) {
void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) {
wxArrayInt selections;
int n = CurrentList->GetSelections(selections);
AssStyle *temp = new AssStyle(styleMap.at(selections[0])->GetEntryData());
wxString newName = _("Copy of ");
newName += temp->name;

View file

@ -321,11 +321,11 @@ void DialogTranslation::OnTransBoxKey(wxKeyEvent &event) {
// Next
if (Hotkeys.IsPressed(_T("Translation Assistant Accept"))) {
bool ok = JumpToLine(curline,curblock+1);
JumpToLine(curline,curblock+1);
TransText->Clear();
TransText->SetFocus();
}
else bool ok = JumpToLine(curline,curblock);
else JumpToLine(curline,curblock);
return;
}

View file

@ -152,7 +152,10 @@ FrameMain::FrameMain (wxArrayString args)
Options.SetInt(_T("Auto check for updates"),option);
Options.Save();
}
if (option == 1) DialogVersionCheck *checker = new DialogVersionCheck (this,true);
if (option == 1) {
DialogVersionCheck *checker = new DialogVersionCheck (this,true);
(void)checker;
}
}

View file

@ -575,6 +575,7 @@ void FrameMain::OnAbout(wxCommandEvent &event) {
// Open check updates
void FrameMain::OnCheckUpdates(wxCommandEvent &event) {
DialogVersionCheck *check = new DialogVersionCheck(this,false);
(void)check;
}
@ -994,7 +995,6 @@ void FrameMain::OnOpenAutomation (wxCommandEvent &event) {
///////////////////////////////////////////////////////////
// General handler for all Automation-generated menu items
void FrameMain::OnAutomationMacro (wxCommandEvent &event) {
AssFile *oldtop = AssFile::top;
activeMacroItems[event.GetId()-Menu_Automation_Macro]->Process(SubsBox->ass, SubsBox->GetAbsoluteSelection(), SubsBox->GetFirstSelRow(), this);
// check if modifications were made and put on undo stack
AssFile::Popping = true; // HACK to avoid getting an additional undo point on stack

View file

@ -106,7 +106,7 @@ void OpenGLWrapper::DrawRing(float x,float y,float r1,float r2,float ar,float ar
// Math
int steps = int((r1 + r1*ar) * range / (2.0f*pi))*4;
if (steps < 12) steps = 12;
float end = arcEnd;
//float end = arcEnd;
float step = range/steps;
float curAngle = arcStart;

View file

@ -48,6 +48,7 @@ public:
wxString katakana;
wxString hepburn;
KanaEntry() {}
KanaEntry(wxString hira,wxString kata,wxString hep) {
hiragana = hira;
katakana = kata;

View file

@ -154,7 +154,7 @@ void MatroskaWrapper::Parse() {
// Variables
ulonglong startTime, endTime, filePos;
unsigned int rt, frameSize, frameFlags;
CompressedStream *cs = NULL;
//CompressedStream *cs = NULL;
// Timecode scale
__int64 timecodeScale = mkv_TruncFloat(trackInfo->TimecodeScale) * segInfo->TimecodeScale;
@ -281,7 +281,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
// Get info
int tracks = mkv_GetNumTracks(file);
TrackInfo *trackInfo;
SegmentInfo *segInfo = mkv_GetFileInfo(file);
//SegmentInfo *segInfo = mkv_GetFileInfo(file);
wxArrayInt tracksFound;
wxArrayString tracksNames;
int trackToRead = -1;
@ -289,7 +289,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
// Haali's library variables
ulonglong startTime, endTime, filePos;
unsigned int rt, frameSize, frameFlags;
CompressedStream *cs = NULL;
//CompressedStream *cs = NULL;
// Find tracks
for (int track=0;track<tracks;track++) {
@ -444,7 +444,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
}
// Insert into vector
if (subList.size() == order) subList.push_back(blockString);
if (subList.size() == (unsigned int)order) subList.push_back(blockString);
else {
if ((signed)(subList.size()) < order+1) subList.resize(order+1);
subList[order] = blockString;

View file

@ -70,6 +70,11 @@ public:
bool isKey;
__int64 filePos;
MkvFrame() {
time = 0;
isKey = false;
filePos = -1;
}
MkvFrame(bool keyframe,double timecode,__int64 _filePos) {
isKey = keyframe;
time = timecode;

View file

@ -181,9 +181,6 @@ void OptionsManager::LoadDefaults() {
// Generate colors
wxColour tempCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
float r = tempCol.Red() / 255.0;
float g = tempCol.Green() / 255.0;
float b = tempCol.Blue() / 255.0;
wxColour textCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
wxColour background = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
wxColour comment = wxColour(216,222,245);

View file

@ -424,7 +424,7 @@ void SubsEditBox::OnNeedStyle(wxScintillaEvent &event) {
///////////////////
// Character added
void SubsEditBox::OnCharAdded(wxScintillaEvent &event) {
int character = event.GetKey();
//int character = event.GetKey();
}
@ -699,7 +699,7 @@ void SubsEditBox::OnMarginLChange(wxCommandEvent &event) {
grid->BeginBatch();
wxArrayInt sel = grid->GetSelection();
int n = sel.Count();
AssDialogue *cur;
AssDialogue *cur = NULL;
for (int i=0;i<n;i++) {
cur = grid->GetDialogue(sel[i]);
if (cur) {
@ -721,7 +721,7 @@ void SubsEditBox::OnMarginRChange(wxCommandEvent &event) {
grid->BeginBatch();
wxArrayInt sel = grid->GetSelection();
int n = sel.Count();
AssDialogue *cur;
AssDialogue *cur = NULL;
for (int i=0;i<n;i++) {
cur = grid->GetDialogue(sel[i]);
if (cur) {
@ -743,7 +743,7 @@ void SubsEditBox::OnMarginVChange(wxCommandEvent &event) {
grid->BeginBatch();
wxArrayInt sel = grid->GetSelection();
int n = sel.Count();
AssDialogue *cur;
AssDialogue *cur = NULL;
for (int i=0;i<n;i++) {
cur = grid->GetDialogue(sel[i]);
if (cur) {
@ -922,7 +922,7 @@ void SubsEditBox::SetOverride (wxString tagname,wxString preValue,int forcePos,b
// Insert variables
wxString insert;
wxString insert2;
int shift;
int shift = 0;
int nInserted = 1;
// Default value

View file

@ -538,7 +538,7 @@ void SubsTextEditCtrl::UpdateCallTip() {
wxString useProto;
wxString cleanProto;
wxString protoName;
int protoN;
int protoN = 0;
bool semiProto = false;
for (unsigned int i=0;i<proto.Count();i++) {
// Get prototype name
@ -599,7 +599,7 @@ void SubsTextEditCtrl::UpdateCallTip() {
if (highEnd == -1) highEnd = useProto.Length();
// Calltip is over
if (highStart == useProto.Length()) {
if (highStart == (signed) useProto.Length()) {
CallTipCancel();
return;
}
@ -807,7 +807,7 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
currentWordPos = activePos;
// Spell check
int style = GetStyleAt(activePos);
//int style = GetStyleAt(activePos);
if (spellchecker && currentWord.Length()) {
// Spelled right?
bool rightSpelling = spellchecker->CheckWord(currentWord);

View file

@ -315,7 +315,7 @@ void PRSSubtitleFormat::InsertFrame(PRSFile &file,int &framen,std::vector<int> &
unsigned char blend = 0;
// Check if it's just an extension of last display
if (lastDisplay && lastDisplay->id == useID && lastDisplay->endFrame == startf-1 &&
if (lastDisplay && lastDisplay->id == (unsigned)useID && (signed)lastDisplay->endFrame == startf-1 &&
lastDisplay->x == x && lastDisplay->y == y && lastDisplay->alpha == alpha && lastDisplay->blend == blend)
{
lastDisplay->end = start;

View file

@ -133,6 +133,7 @@ void CSRISubtitlesProvider::DrawSubtitles(AegiVideoFrame &dst,double time) {
switch (dst.format) {
case FORMAT_RGB32: frame.pixfmt = CSRI_F_BGR_; break;
case FORMAT_RGB24: frame.pixfmt = CSRI_F_BGR; break;
default: frame.pixfmt = CSRI_F_BGR_;
}
// Set format

View file

@ -57,7 +57,7 @@ __int64 abs64(__int64 input) {
///////////////////////////////////////
// Count number of matches of a substr
int CountMatches(wxString parent,wxString child) {
size_t pos = -1;
size_t pos = wxString::npos;
int n = 0;
while ((pos = parent.find(child,pos+1)) != wxString::npos) n++;
return n;

View file

@ -402,7 +402,7 @@ GLuint VideoContext::GetFrameAsTexture(int n) {
lastFrame = n;
// Image type
GLenum format;
GLenum format = GL_LUMINANCE;
if (frame.format == FORMAT_RGB32) {
if (frame.invertChannels) format = GL_BGRA_EXT;
else format = GL_RGBA;

View file

@ -149,7 +149,7 @@ void VideoDisplayVisual::DrawOverlay() {
diag = VideoContext::Get()->grid->GetDialogue(i);
if (diag) {
// Draw?
bool draw = false;
//bool draw = false;
bool high = false;
bool isCur = diag == curSelection;
bool timeVisible = VFR_Output.GetFrameAtTime(diag->Start.GetMS(),true) <= frame_n && VFR_Output.GetFrameAtTime(diag->End.GetMS(),false) >= frame_n;
@ -773,8 +773,8 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
if (mode == 1) {
// For each line
int numRows = VideoContext::Get()->grid->GetRows();
int startMs = VFR_Output.GetTimeAtFrame(frame_n,true);
int endMs = VFR_Output.GetTimeAtFrame(frame_n,false);
//int startMs = VFR_Output.GetTimeAtFrame(frame_n,true);
//int endMs = VFR_Output.GetTimeAtFrame(frame_n,false);
AssDialogue *diag;
// Don't uninvert this loop or selection will break

View file

@ -82,7 +82,7 @@ void AegiVideoFrame::Allocate() {
// Get size
int height = h;
if (format == FORMAT_YV12 && i > 0) height/=2;
int size = pitch[i]*height;
unsigned int size = pitch[i]*height;
// Reallocate, if necessary
if (memSize[i] != size) {

View file

@ -359,7 +359,7 @@ HRESULT DirectShowVideoProvider::OpenVideo(wxString _filename) {
else fps = 10000000.0 / double(defd);
// Set number of frames
last_fnum = -1;
last_fnum = 0;
num_frames = duration / defd;
// Store filters
@ -507,7 +507,7 @@ const AegiVideoFrame DirectShowVideoProvider::DoGetFrame(int n) {
if (cur < 0) cur = 0;
// Is next
if (n == last_fnum + 1) {
if (n == (signed)last_fnum + 1) {
//rdf.frame.Clear();
NextFrame(rdf,fn);
last_fnum = n;

View file

@ -173,7 +173,7 @@ void VideoSlider::UpdateVideo() {
void VideoSlider::OnMouse(wxMouseEvent &event) {
// Coordinates
int x = event.GetX();
int y = event.GetY();
//int y = event.GetY();
bool shift = event.m_shiftDown;
// Left click