From 4f5d17c6616eef6577d06c6a3781992090705d93 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 23 Oct 2011 20:16:55 +0200 Subject: [PATCH] Build system: don't check for HAVE_ZLIB_H zlib is a required component (configure aborts if it isn't found) anyway. --- src/common/compression.cpp | 16 +++------------- src/common/compression.h | 2 -- src/input/r_qtmp4.cpp | 8 -------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/common/compression.cpp b/src/common/compression.cpp index 687d8e94f..9a9c5b6a8 100644 --- a/src/common/compression.cpp +++ b/src/common/compression.cpp @@ -102,7 +102,6 @@ lzo_compressor_c::compress(memory_cptr &buffer) { // --------------------------------------------------------------------- -#if defined(HAVE_ZLIB_H) zlib_compressor_c::zlib_compressor_c() : compressor_c(COMPRESSION_ZLIB) { @@ -185,8 +184,6 @@ zlib_compressor_c::compress(memory_cptr &buffer) { buffer = memory_cptr(new memory_c((unsigned char *)saferealloc(dst, dstsize), dstsize, true)); } -#endif // HAVE_ZLIB_H - // --------------------------------------------------------------------- #if defined(HAVE_BZLIB_H) @@ -437,10 +434,8 @@ compressor_c::create(const char *method) { return compressor_ptr(new lzo_compressor_c()); #endif // HAVE_LZO1X_H -#if defined(HAVE_ZLIB_H) if (!strcasecmp(method, compression_methods[COMPRESSION_ZLIB])) return compressor_ptr(new zlib_compressor_c()); -#endif // HAVE_ZLIB_H #if defined(HAVE_BZLIB_H) if (!strcasecmp(method, compression_methods[COMPRESSION_BZ2])) @@ -584,15 +579,10 @@ content_decoder_c::initialize(KaxTrackEntry &ktentry) { break; } - if (0 == enc.comp_algo) { -#if !defined(HAVE_ZLIB_H) - mxwarn(boost::format(Y("Track %1% was compressed with zlib but mkvmerge has not been compiled with support for zlib compression.\n")) % tid); - ok = false; - break; -#else + if (0 == enc.comp_algo) enc.compressor = counted_ptr(new zlib_compressor_c()); -#endif - } else if (1 == enc.comp_algo) { + + else if (1 == enc.comp_algo) { #if !defined(HAVE_BZLIB_H) mxwarn(boost::format(Y("Track %1% was compressed with bzlib but mkvmerge has not been compiled with support for bzlib compression.\n")) % tid); ok = false; diff --git a/src/common/compression.h b/src/common/compression.h index dac2a5282..87b1d95c3 100644 --- a/src/common/compression.h +++ b/src/common/compression.h @@ -102,7 +102,6 @@ public: }; #endif // HAVE_LZO -#if defined(HAVE_ZLIB_H) #include class MTX_DLL_API zlib_compressor_c: public compressor_c { @@ -113,7 +112,6 @@ public: virtual void decompress(memory_cptr &buffer); virtual void compress(memory_cptr &buffer); }; -#endif // HAVE_ZLIB_H #if defined(HAVE_BZLIB_H) #include diff --git a/src/input/r_qtmp4.cpp b/src/input/r_qtmp4.cpp index 566ae2a1e..9d5019038 100644 --- a/src/input/r_qtmp4.cpp +++ b/src/input/r_qtmp4.cpp @@ -20,9 +20,7 @@ #include #include #include -#if defined(HAVE_ZLIB_H) #include -#endif #include @@ -492,8 +490,6 @@ qtmp4_reader_c::handle_cmov_atom(qt_atom_t parent, void qtmp4_reader_c::handle_cmvd_atom(qt_atom_t atom, int level) { -#if defined(HAVE_ZLIB_H) - uint32_t moov_size = io->read_uint32_be(); mxverb(2, boost::format("Quicktime/MP4 reader:%1%Uncompressed size: %2%\n") % space((level + 1) * 2 + 1) % moov_size); @@ -548,10 +544,6 @@ qtmp4_reader_c::handle_cmvd_atom(qt_atom_t atom, } delete io; io = old_io; - -#else // HAVE_ZLIB_H - mxerror(Y("mkvmerge was not compiled with zlib. Compressed headers in QuickTime/MP4 files are therefore not supported.\n")); -#endif // HAVE_ZLIB_H } void