mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 20:01:53 +00:00
Wrong calculation of the duration in case of Vorbis packets whose container timecodes are not what the packet's durations indicate they should be.
This commit is contained in:
parent
32fcbbc829
commit
0ff59ed27e
@ -194,7 +194,9 @@ vorbis_packetizer_c::process(memory_c &mem,
|
|||||||
|
|
||||||
if (timecode > (expected_timecode + 100000000)) {
|
if (timecode > (expected_timecode + 100000000)) {
|
||||||
chosen_timecode = timecode;
|
chosen_timecode = timecode;
|
||||||
duration = timecode - last_timecode;
|
duration = timecode -
|
||||||
|
(last_timecode + last_samples_sum * 1000000000 / vi.rate +
|
||||||
|
timecode_offset);
|
||||||
last_timecode = timecode;
|
last_timecode = timecode;
|
||||||
last_samples_sum = 0;
|
last_samples_sum = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -218,7 +220,7 @@ vorbis_packetizer_c::process(memory_c &mem,
|
|||||||
"(last_samples_sum: %lld)\n",
|
"(last_samples_sum: %lld)\n",
|
||||||
chosen_timecode, timecode, expected_timecode,
|
chosen_timecode, timecode, expected_timecode,
|
||||||
samples_here, last_samples_sum);
|
samples_here, last_samples_sum);
|
||||||
add_packet(mem, expected_timecode, duration);
|
add_packet(mem, chosen_timecode, duration);
|
||||||
|
|
||||||
debug_leave("vorbis_packetizer_c::process");
|
debug_leave("vorbis_packetizer_c::process");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user