mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
fix compilation with libEBML/libMatroska v2.0
This commit is contained in:
parent
522f46f472
commit
506bda2aa9
@ -31,14 +31,19 @@ kax_reference_block_c::UpdateSize(
|
||||
bool bSaveDefault,
|
||||
#endif
|
||||
bool bForceRender) {
|
||||
#if LIBEBML_VERSION >= 0x020000
|
||||
if (!bTimestampSet) {
|
||||
assert(-1 != m_value);
|
||||
SetValue((m_value - static_cast<int64_t>(ParentBlock->GlobalTimecode())) / static_cast<int64_t>(ParentBlock->GlobalTimecodeScale()));
|
||||
}
|
||||
|
||||
return libebml::EbmlSInteger::UpdateSize(writeFilter, bForceRender);
|
||||
#else
|
||||
if (!bTimecodeSet) {
|
||||
assert(-1 != m_value);
|
||||
SetValue((m_value - static_cast<int64_t>(ParentBlock->GlobalTimecode())) / static_cast<int64_t>(ParentBlock->GlobalTimecodeScale()));
|
||||
}
|
||||
|
||||
#if LIBEBML_VERSION >= 0x020000
|
||||
return libebml::EbmlSInteger::UpdateSize(writeFilter, bForceRender);
|
||||
#else
|
||||
return libebml::EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
|
||||
#endif
|
||||
}
|
||||
|
@ -28,18 +28,32 @@
|
||||
class kax_cluster_c: public libmatroska::KaxCluster {
|
||||
public:
|
||||
kax_cluster_c(): libmatroska::KaxCluster() {
|
||||
#if LIBMATROSKA_VERSION >= 0x020000
|
||||
PreviousTimestamp = 0;
|
||||
#else
|
||||
PreviousTimecode = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
virtual ~kax_cluster_c();
|
||||
|
||||
void delete_non_blocks();
|
||||
|
||||
#if LIBMATROSKA_VERSION >= 0x020000
|
||||
void set_min_timestamp(int64_t min_timestamp) {
|
||||
MinTimestamp = min_timestamp;
|
||||
}
|
||||
void set_max_timestamp(int64_t max_timestamp) {
|
||||
MaxTimestamp = max_timestamp;
|
||||
}
|
||||
#else
|
||||
void set_min_timestamp(int64_t min_timestamp) {
|
||||
MinTimecode = min_timestamp;
|
||||
}
|
||||
void set_max_timestamp(int64_t max_timestamp) {
|
||||
MaxTimecode = max_timestamp;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
class kax_reference_block_c: public libmatroska::KaxReferenceBlock {
|
||||
@ -50,12 +64,8 @@ public:
|
||||
kax_reference_block_c();
|
||||
|
||||
void set_value(int64_t value) {
|
||||
m_value = value;
|
||||
#if LIBEBML_VERSION < 0x000800
|
||||
bValueIsSet = true;
|
||||
#else
|
||||
m_value = value;
|
||||
SetValueIsSet();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LIBEBML_VERSION >= 0x020000
|
||||
|
Loading…
Reference in New Issue
Block a user