From bbed6aaecc7ae7809f9e34bf288e5f338141577f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 19 Jan 2005 20:58:04 +0000 Subject: [PATCH] Fixes for compiler warnings, errors, and linker errors. --- src/common/segmentinfo.h | 17 ++++++----------- src/common/segmentinfo_parser.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/common/segmentinfo.h b/src/common/segmentinfo.h index ce248951c..c60369bfe 100644 --- a/src/common/segmentinfo.h +++ b/src/common/segmentinfo.h @@ -14,24 +14,19 @@ Steve Lhomme . */ -#ifndef __INFOS_H -#define __INFOS_H +#ifndef __SEGMENTINFO_H +#define __SEGMENTINFO_H #include #include "ebml/EbmlElement.h" +#include "matroska/KaxInfoData.h" +#include "matroska/KaxSegment.h" + #include "common.h" #include "mm_io.h" -namespace libebml { - class EbmlMaster; -}; - -namespace libmatroska { - class KaxSegment; -}; - using namespace libebml; using namespace libmatroska; @@ -44,5 +39,5 @@ KaxSegment *MTX_DLL_API parse_xml_segmentinfo(mm_text_io_c *in, void MTX_DLL_API fix_mandatory_segmentinfo_elements(EbmlElement *e); -#endif // __INFOS_H +#endif // __SEGMENTINFO_H diff --git a/src/common/segmentinfo_parser.cpp b/src/common/segmentinfo_parser.cpp index 055a65b91..c41133782 100644 --- a/src/common/segmentinfo_parser.cpp +++ b/src/common/segmentinfo_parser.cpp @@ -88,8 +88,8 @@ probe_xml_segmentinfos(mm_text_io_c *in) { } KaxSegment * -parse_xml_segmentinfos(mm_text_io_c *in, - bool exception_on_error) { +parse_xml_segmentinfo(mm_text_io_c *in, + bool exception_on_error) { KaxSegment *segment; EbmlMaster *m; string error; @@ -108,7 +108,7 @@ parse_xml_segmentinfos(mm_text_io_c *in, try { m = parse_xml_elements("Info", segmentinfo_elements, in); - // segment = dynamic_cast(sort_ebml_master(m)); + segment = dynamic_cast(sort_ebml_master(m)); assert(segment != NULL); } catch (error_c e) { if (!exception_on_error) @@ -123,7 +123,7 @@ parse_xml_segmentinfos(mm_text_io_c *in, if (error.length() > 0) throw error_c(error); - // fix_mandatory_segmentsegmentinfo_elements(dynamic_cast(segment)); + fix_mandatory_segmentinfo_elements(segment); return segment; }