mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
mkvmerge: don't generate segment UIDs for discarded segments on splitting
Fixes #1497.
This commit is contained in:
parent
31bc8633d4
commit
6a594e6b87
@ -1,5 +1,9 @@
|
||||
2015-11-03 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: fixed the values of the "previous/next
|
||||
segment UID" elements when splitting by parts with segment linking
|
||||
enabled. Fixes #1497.
|
||||
|
||||
* mkvmerge: bug fix: mkvmerge no longer creates a "next segment
|
||||
UID" field in the last file when splitting and segment linking is
|
||||
active.
|
||||
|
@ -497,6 +497,9 @@ rerender_ebml_head() {
|
||||
|
||||
static void
|
||||
generate_segment_uids() {
|
||||
if (g_cluster_helper->discarding())
|
||||
return;
|
||||
|
||||
// Generate the segment UIDs.
|
||||
if (hack_engaged(ENGAGE_NO_VARIABLE_DATA)) {
|
||||
s_seguid_current.zero_content();
|
||||
|
@ -353,3 +353,4 @@ T_504dts_96_24_identification:1837ab5b411944e143f9dae6fe6436d8-bb7c41b5aa1b57f18
|
||||
T_505cisco_talos_can_0036:bf0fedc494cf99a0920d7a6e69edf952-6ef415b0f84d3e5dd435244362a37584:passed:20151020-161153:0.071686357
|
||||
T_506cisco_talos_can_0037:5461288548eac976164cd13f01bc9426-ed695caee29b1456da8629d38321ec9c-92b7169fc05ddf54c46816869c108f31-54a55a6d87bd4c08269891efb03980b3-fef3d018523c7d1fbed763f6666c1ae2-ac584cc44854f9396739df6e93d78acc-b415b2ef2a6dddf5d89733446fae2970-dd53fee23372c569d35e0b2918d86239:passed:20151020-161234:0.319298931
|
||||
T_507rerender_track_headers:7b16f08b7858a1d332516a6fb25a184b-ac9514a1f09f26ac0cb2f527ec2de0b7:passed:20151022-104930:2.573204876
|
||||
T_508splitting_by_parts_with_segment_linking:existence0-true-true-true-existence1-true-true-true-existence2-true-true-true-equality_previous-true-true-equality_next-true-true:passed:20151103-204257:0.111807853
|
||||
|
49
tests/test-508splitting_by_parts_with_segment_linking.rb
Executable file
49
tests/test-508splitting_by_parts_with_segment_linking.rb
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
# T_508splitting_by_parts_with_segment_linking
|
||||
describe "mkvmerge / splitting by parts with segment linking enabled"
|
||||
|
||||
self.sys "../src/mkvmerge -o #{tmp} data/avi/v-h264-aac.avi --split parts:00:00:00-00:00:10,00:00:30-00:00:40,00:00:50- --link", :keep_tmp => true, :exit_code => :success
|
||||
|
||||
test "segment UIDs" do
|
||||
uids = []
|
||||
result = []
|
||||
|
||||
(1..3).each do |idx|
|
||||
uids << info("#{tmp}-00#{idx}", :output => :return).
|
||||
first.
|
||||
select { |line| /segment uid/i.match(line) }.
|
||||
map { |line| line.gsub(/^\| *\+ */, '').chomp.downcase.split(/ *uid: */) }.
|
||||
to_h
|
||||
end
|
||||
|
||||
result << "existence0"
|
||||
|
||||
result << uids[0]['previous segment'].nil?
|
||||
result << !uids[0]['segment'].nil?
|
||||
result << !uids[0]['next segment'].nil?
|
||||
|
||||
result << "existence1"
|
||||
|
||||
result << !uids[1]['previous segment'].nil?
|
||||
result << !uids[1]['segment'].nil?
|
||||
result << !uids[1]['next segment'].nil?
|
||||
|
||||
result << "existence2"
|
||||
|
||||
result << !uids[2]['previous segment'].nil?
|
||||
result << !uids[2]['segment'].nil?
|
||||
result << uids[2]['next segment'].nil?
|
||||
|
||||
result << "equality_previous"
|
||||
|
||||
result << (uids[0]['segment'] == uids[1]['previous segment'])
|
||||
result << (uids[1]['segment'] == uids[2]['previous segment'])
|
||||
|
||||
result << "equality_next"
|
||||
|
||||
result << (uids[1]['segment'] == uids[0]['next segment'])
|
||||
result << (uids[2]['segment'] == uids[1]['next segment'])
|
||||
|
||||
result.map(&:to_s).join('-')
|
||||
end
|
Loading…
Reference in New Issue
Block a user