16 Commits

Author SHA1 Message Date
Moritz Bunkus
4ae04f4f5e Release v1.2.1
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/tags/libebml/libebml-1.2.1@768 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-26 18:14:33 +00:00
Moritz Bunkus
ef72dc1bae Version number bump in spec files
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@766 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-26 18:13:26 +00:00
Moritz Bunkus
e31af9504a Release v1.2.1
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/tags/libebml/libebml-1.2.1@763 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-26 17:40:17 +00:00
Moritz Bunkus
84f17676f0 Release date update
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@762 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-26 17:39:25 +00:00
Moritz Bunkus
54782a8ee9 Bumped version number in Debian changelog
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@759 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-15 11:58:26 +00:00
Steve Lhomme
7922aef03d libebml: code cleaning
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@757 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-12 09:51:25 +00:00
Steve Lhomme
83cc857424 update the version headers
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@756 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-12 09:21:05 +00:00
Steve Lhomme
8200c78a85 libebml: update the ChangeLog for a pending release
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@755 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-06-12 09:20:21 +00:00
Steve Lhomme
f2545cc6d7 libebml: fix the size returned by MemIOCallback::read() when reaching the end of the buffer
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@747 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-04-26 17:14:24 +00:00
Steve Lhomme
81b5b9ff60 libebml: fix the constructor of CRTError (path from Graham 'gbooker' Booker)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@746 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-04-14 07:40:25 +00:00
Steve Lhomme
c064df6936 libebml: add a macro to define signed integer elements that have a default value
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@722 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-03-27 16:43:10 +00:00
Moritz Bunkus
a828485b74 Updated the "Section" entries in the Debian package file
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@716 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-03-25 10:48:24 +00:00
Steve Lhomme
676d1ba310 libebml: fix compilation of debug builds under win32
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@708 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-03-20 17:33:49 +00:00
Moritz Bunkus
9ff9decf8c Include <string> headers when std::string is used
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@672 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-02-05 21:26:49 +00:00
Moritz Bunkus
3a490a84ce Avoid compiler warnings due to differences in signs in comparisons
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@671 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-02-05 21:15:22 +00:00
Moritz Bunkus
d70416282f Use an explicit cast to std::string; fixes compilation with Sun Studio C compiler
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@670 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2011-02-05 21:11:28 +00:00
13 changed files with 37 additions and 14 deletions

View File

@@ -1,3 +1,11 @@
2011-06-26 robux4/mosu
New 1.2.1 version:
- fix the constructor of CRTError in StdIOCallback (patch from Graham 'gbooker' Booker)
- fix the size returned by MemIOCallback::read() when reaching the end of the buffer
- add a macro to define signed integer elements that have a default value
- fix compilation of debug builds on win32
- fix for Sun Studio C compiler
2011-01-30 robux4/mosu
New 1.2.0 version:
- no need to put the internal code of EbmlCrc32 in the public header

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
libebml (1.2.1-1) natty; urgency=low
* New version.
-- Moritz Bunkus <moritz@bunkus.org> Wed, 15 Jun 2011 13:55:50 +0200
libebml (1.2.0-1) lucid; urgency=low
* New version.

3
debian/control vendored
View File

@@ -3,9 +3,10 @@ Priority: optional
Maintainer: Moritz Bunkus <moritz@bunkus.org>
Build-Depends: debhelper (>> 3.0.0)
Standards-Version: 3.5.8
Section: libs
Package: libebml-dev
Section: devel
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}
Description: Extensible Binary Meta Language access library

View File

@@ -116,6 +116,12 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, name, Context_##x); \
x::x() :EbmlUInteger(defval) {}
#define DEFINE_xxx_SINTEGER_DEF(x,id,idl,parent,name,global,defval) \
const EbmlId Id_##x (id, idl); \
const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, &Context_##parent, global, &EBML_INFO(x)); \
const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, name, Context_##x); \
x::x() :EbmlSInteger(defval) {}
#define DEFINE_xxx_STRING_DEF(x,id,idl,parent,name,global,defval) \
const EbmlId Id_##x (id, idl); \
const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, &Context_##parent, global, &EBML_INFO(x)); \

View File

@@ -42,9 +42,9 @@
START_LIBEBML_NAMESPACE
#define LIBEBML_VERSION 0x010200
#define LIBEBML_VERSION 0x010201
static const std::string EbmlCodeVersion = "1.2.0";
static const std::string EbmlCodeVersion = "1.2.1";
static const std::string EbmlCodeDate = __TIMESTAMP__;
/*!

View File

@@ -2,7 +2,7 @@
LIB ebml
{
PROJECT_VERSION 1.2.0
PROJECT_VERSION 1.2.1
INCLUDE .
EXPINCLUDE .

View File

@@ -1,7 +1,7 @@
# SPEC file for libebml on (at least) Fedora Core 1, 2, 3
Name: libebml
Version: 1.2.0
Version: 1.2.1
Release: 1
License: LGPL
Summary: Extensible Binary Meta Language

View File

@@ -14,7 +14,7 @@ BuildRequires: bzip2 cpp make tar zlib zlib-devel binutils gcc gcc-c++ libstdc++
Name: libebml
URL: http://sourceforge.net/projects/ebml
Version: 1.2.0
Version: 1.2.1
Release: 1
Summary: libary to parse EBML files.
License: LGPL

View File

@@ -35,6 +35,7 @@
\author Julien Coloos <suiryc @ users.sf.net>
*/
#include <cassert>
#include <string>
#include "ebml/EbmlBinary.h"
#include "ebml/StdIOCallback.h"
@@ -91,9 +92,9 @@ filepos_t EbmlBinary::ReadData(IOCallback & input, ScopeMode ReadFully)
return GetSize();
}
Data = (binary *)malloc(GetSize() * sizeof(binary));
Data = (binary *)malloc(GetSize());
if (Data == NULL)
throw CRTError("Error allocating data");
throw CRTError(std::string("Error allocating data"));
SetValueIsSet();
return input.read(Data, GetSize());
}

View File

@@ -49,7 +49,7 @@ START_LIBEBML_NAMESPACE
*/
int CodedSizeLength(uint64 Length, unsigned int SizeLength, bool bSizeFinite)
{
int CodedSize;
unsigned int CodedSize;
if (bSizeFinite) {
// prepare the head of the size (000...01xxxxxx)
// optimal size
@@ -587,7 +587,7 @@ filepos_t EbmlElement::Render(IOCallback & output, bool bWithDefault, bool bKeep
filepos_t result = RenderHead(output, bForceRender, bWithDefault, bKeepPosition);
uint64 WrittenSize = RenderData(output, bForceRender, bWithDefault);
#if defined(_DEBUG) || defined(DEBUG)
if (SupposedSize != (0-1)) assert(WrittenSize == SupposedSize);
if (static_cast<int64>(SupposedSize) != (0-1)) assert(WrittenSize == SupposedSize);
#endif // DEBUG
result += WrittenSize;
return result;

View File

@@ -146,7 +146,7 @@ uint64 EbmlMaster::UpdateSize(bool bWithDefault, bool bForceRender)
(ElementList[Index])->UpdateSize(bWithDefault, bForceRender);
uint64 SizeToAdd = (ElementList[Index])->ElementSize(bWithDefault);
#if defined(_DEBUG) || defined(DEBUG)
if (SizeToAdd == (0-1))
if (static_cast<int64>(SizeToAdd) == (0-1))
return (0-1);
#endif // DEBUG
SetSize_(GetSize() + SizeToAdd);

View File

@@ -72,8 +72,9 @@ uint32 MemIOCallback::read(void *Buffer, size_t Size)
{
//We will only return the remaining data
memcpy(Buffer, dataBuffer + dataBufferPos, dataBufferTotalSize - dataBufferPos);
uint64 oldDataPos = dataBufferPos;
dataBufferPos = dataBufferTotalSize;
return dataBufferTotalSize - dataBufferPos;
return dataBufferTotalSize - oldDataPos;
}
//Well... We made it here, so do a quick and simple copy

View File

@@ -49,13 +49,13 @@ START_LIBEBML_NAMESPACE
CRTError::CRTError(int nError, const std::string & Description)
:std::runtime_error(Description+": "+strerror(nError))
,Error(Error)
,Error(nError)
{
}
CRTError::CRTError(const std::string & Description,int nError)
:std::runtime_error(Description+": "+strerror(nError))
,Error(Error)
,Error(nError)
{
}