Don't use the default compression scheme if the CLI overrides it

This commit is contained in:
Moritz Bunkus 2010-09-04 18:34:48 +02:00
parent 7967e294f3
commit c79137a342
4 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2010-09-04 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Appending tracks which would normally be
compressed (e.g. with header removal compression) and turning off
compression for those tracks with "--compression TID:none" (or the
corresponsing option in mmg) was resulting in the second and all
following appended tracks to be compressed all the same.
2010-09-01 Moritz Bunkus <moritz@bunkus.org>
* mkvextract: bug fix: Errors such as 'file does not exist' did

View File

@ -229,6 +229,10 @@ generic_packetizer_c::generic_packetizer_c(generic_reader_c *reader,
else if (map_has_key(m_ti.m_nalu_size_lengths, -1))
m_ti.m_nalu_size_length = m_ti.m_nalu_size_lengths[-1];
// Let's see if the user has specified a compression scheme for this track.
if (COMPRESSION_UNSPECIFIED != m_ti.m_compression)
m_hcompression = m_ti.m_compression;
// Set default header values to 'unset'.
if (!m_reader->m_appending)
m_hserialno = create_track_number(m_reader, m_ti.m_id);
@ -721,8 +725,6 @@ generic_packetizer_c::set_headers() {
}
if (COMPRESSION_UNSPECIFIED != m_ti.m_compression)
m_hcompression = m_ti.m_compression;
if ((COMPRESSION_UNSPECIFIED != m_hcompression) && (COMPRESSION_NONE != m_hcompression)) {
KaxContentEncoding &c_encoding = GetChild<KaxContentEncoding>(GetChild<KaxContentEncodings>(m_track_entry));

View File

@ -567,7 +567,8 @@ public:
virtual void set_track_name(const std::string &name);
virtual void set_default_compression_method(compression_method_e method) {
m_hcompression = method;
if (COMPRESSION_UNSPECIFIED == m_hcompression)
m_hcompression = method;
}
virtual void force_duration_on_last_packet();

View File

@ -124,7 +124,7 @@ T_274h264_in_nalus_in_avi:8ea9e4851a32a5afd8c042eaa9a4d014:passed:20100629-09072
T_275srt_mixed_eol_styles:99c107c5c61d8ceab4f955ff51e6eb55:passed:20100706-090848:0.414861741
T_276h264_without_nalus_in_avi:568d6322703c9f6763addfbafc31dab2:passed:20100706-224102:0.922168875
T_277display_dimensions_fixing_aspect_ratio_usage:2f5549932b476c234e72b9f7ea3ed19c-f269a5ac10c490998300ab3ed37706b7-39de27669f5926c9ae3b93f0d283622a:passed:20100718-201627:2.586261178
T_278turning_off_compression:3566783209ac478a943dedbd7f84c99f-3566783209ac478a943dedbd7f84c99f:passed:20100728-121842:0.806040817
T_278turning_off_compression:3461183816a7126fb01f4cde9c4aa52c-3461183816a7126fb01f4cde9c4aa52c:passed:20100728-121842:0.806040817
T_279packet_queue_not_empty_ivf:bdf5cd8ef11a173be74c86cd163a659c:passed:20100805-230439:0.039703223
T_280replace_one_byte_with_ebmlvoid:1b79d74382a4424cce0d356ac72e5a82:passed:20100824-201249:0.058314813
T_281idr_after_non_idr_not_recognized:9e512b7e46d5bacf4c6f396141622611:passed:20100828-194029:0.763712844