Fixes for compilation on Windows.

This commit is contained in:
Moritz Bunkus 2004-02-08 18:34:51 +00:00
parent 79badd76e2
commit 2b25f0cbb4
2 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,7 @@
\author Moritz Bunkus <moritz@bunkus.org>
*/
#include "os.h"
#include "config.h"
#include <stdio.h>
@ -28,6 +29,11 @@
#if defined(HAVE_FLAC_FORMAT_H)
#include <FLAC/stream_decoder.h>
#endif
#if defined(SYS_WINDOWS)
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#endif
extern "C" { // for BITMAPINFOHEADER
#include "avilib.h"

View File

@ -1384,7 +1384,7 @@ tab_chapters::on_add_chapter_name(wxCommandEvent &evt) {
*static_cast<EbmlString *>(&GetChild<KaxChapterCountry>(*cdisplay)) =
default_chapter_country.c_str();
// Workaround for a bug in libebml
if (i == t->chapter->ListSize())
if (i == (t->chapter->ListSize() - 1))
t->chapter->PushElement(*cdisplay);
else
t->chapter->InsertElement(*cdisplay, i + 1);