mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Error out if MPEG-4 part 2 compression is selected but native MPEG-4 mode isn't.
This commit is contained in:
parent
2496ee620d
commit
670f5d12db
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "commonebml.h"
|
#include "commonebml.h"
|
||||||
#include "compression.h"
|
#include "compression.h"
|
||||||
|
#include "hacks.h"
|
||||||
|
|
||||||
using namespace libmatroska;
|
using namespace libmatroska;
|
||||||
|
|
||||||
@ -314,6 +315,17 @@ header_removal_compressor_c::set_track_headers(KaxContentEncoding
|
|||||||
SetBuffer(m_bytes->get(), m_bytes->get_size());
|
SetBuffer(m_bytes->get(), m_bytes->get_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mpeg4_p2_compressor_c::mpeg4_p2_compressor_c() {
|
||||||
|
if (!hack_engaged(ENGAGE_NATIVE_MPEG4))
|
||||||
|
mxerror("The MPEG-4 part 2 compression only works with native MPEG-4. "
|
||||||
|
"However, native MPEG-4 mode has not been selected with "
|
||||||
|
"'--engage native_mpeg4'.\n");
|
||||||
|
|
||||||
|
memory_cptr bytes(new memory_c((unsigned char *)safemalloc(4), 4, true));
|
||||||
|
put_uint32_be(bytes->get(), 0x000001b6);
|
||||||
|
set_bytes(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
compressor_c::~compressor_c() {
|
compressor_c::~compressor_c() {
|
||||||
|
@ -142,11 +142,7 @@ public:
|
|||||||
|
|
||||||
class MTX_DLL_API mpeg4_p2_compressor_c: public header_removal_compressor_c {
|
class MTX_DLL_API mpeg4_p2_compressor_c: public header_removal_compressor_c {
|
||||||
public:
|
public:
|
||||||
mpeg4_p2_compressor_c() {
|
mpeg4_p2_compressor_c();
|
||||||
memory_cptr bytes(new memory_c((unsigned char *)safemalloc(4), 4, true));
|
|
||||||
put_uint32_be(bytes->get(), 0x000001b6);
|
|
||||||
set_bytes(bytes);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user