mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
When reading Matroska files & splitting all packets were accidentally considered to be splitpoints. Same situation: the list of unique numbers was not cleaned, and therefore the second pass could not keep the UIDs.
This commit is contained in:
parent
65a960f3e6
commit
11e4b5cba3
@ -448,7 +448,7 @@ int cluster_helper_c::render() {
|
||||
// The next stuff is for splitting files.
|
||||
if (pass == 1) { // first pass: find splitpoints
|
||||
if ((pack->bref == -1) && // this is a keyframe
|
||||
((video_fps == -1) || // either no video track present...
|
||||
(!video_track_present || // either no video track present...
|
||||
// ...or this is the video track
|
||||
(source->get_track_type() == track_video))) {
|
||||
sp = (splitpoint_t *)safemalloc(sizeof(splitpoint_t));
|
||||
|
@ -552,6 +552,10 @@ char *from_utf8(int handle, const char *utf8) {
|
||||
|
||||
static vector<uint32_t> ru_numbers;
|
||||
|
||||
void clear_list_of_unique_uint32() {
|
||||
ru_numbers.clear();
|
||||
}
|
||||
|
||||
bool is_unique_uint32(uint32_t number) {
|
||||
int i;
|
||||
|
||||
|
@ -115,6 +115,7 @@ void utf8_done();
|
||||
char *to_utf8(int handle, const char *local);
|
||||
char *from_utf8(int handle, const char *utf8);
|
||||
|
||||
void clear_list_of_unique_uint32();
|
||||
bool is_unique_uint32(uint32_t number);
|
||||
void add_unique_uint32(uint32_t number);
|
||||
uint32_t create_unique_uint32();
|
||||
|
@ -1635,6 +1635,7 @@ static void init_globals() {
|
||||
default_tracks[2] = 0;
|
||||
display_counter = 1;
|
||||
display_reader = NULL;
|
||||
clear_list_of_unique_uint32();
|
||||
}
|
||||
|
||||
static void destroy_readers() {
|
||||
@ -1986,6 +1987,8 @@ void main_loop() {
|
||||
// {{{ FUNCTION main(int argc, char **argv)
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
time_t start, end;
|
||||
|
||||
init_globals();
|
||||
|
||||
setup();
|
||||
@ -1995,6 +1998,8 @@ int main(int argc, char **argv) {
|
||||
if (split_after > 0) {
|
||||
mxinfo("Pass 1: finding split points. This may take a while.\n\n");
|
||||
|
||||
start = time(NULL);
|
||||
|
||||
create_readers();
|
||||
|
||||
if (packetizers.size() == 0)
|
||||
@ -2005,7 +2010,12 @@ int main(int argc, char **argv) {
|
||||
main_loop();
|
||||
finish_file();
|
||||
|
||||
mxinfo("\nPass 2: merging the files. This will take even longer.\n\n");
|
||||
end = time(NULL);
|
||||
|
||||
mxinfo("\nPass 1 took %u seconds.\nPass 2: merging the files. This will "
|
||||
"take even longer.\n\n", end - start);
|
||||
|
||||
start = time(NULL);
|
||||
|
||||
delete cluster_helper;
|
||||
destroy_readers();
|
||||
@ -2021,8 +2031,13 @@ int main(int argc, char **argv) {
|
||||
main_loop();
|
||||
finish_file();
|
||||
|
||||
end = time(NULL);
|
||||
mxinfo("Pass 2 took %u seconds.\n", end - start);
|
||||
|
||||
} else {
|
||||
|
||||
start = time(NULL);
|
||||
|
||||
create_readers();
|
||||
|
||||
if (packetizers.size() == 0)
|
||||
@ -2032,6 +2047,9 @@ int main(int argc, char **argv) {
|
||||
create_next_output_file(true, true);
|
||||
main_loop();
|
||||
finish_file();
|
||||
|
||||
end = time(NULL);
|
||||
mxinfo("Muxing took %u seconds.\n", end - start);
|
||||
}
|
||||
|
||||
cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user