From 3513341664b1ad01b39ce004c573ab7beeac1f27 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 12 Jun 2005 08:03:58 +0000 Subject: [PATCH] Assign consecutive numbers to all created packet_t objects. --- src/merge/pr_generic.cpp | 2 ++ src/merge/pr_generic.h | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/merge/pr_generic.cpp b/src/merge/pr_generic.cpp index 98fe85363..0e1b06227 100644 --- a/src/merge/pr_generic.cpp +++ b/src/merge/pr_generic.cpp @@ -36,6 +36,8 @@ using namespace std; +int64_t packet_t::packet_number_counter = 0; + packet_t::~packet_t() { vector::iterator i; diff --git a/src/merge/pr_generic.h b/src/merge/pr_generic.h index 673584fc4..7c039ed8b 100644 --- a/src/merge/pr_generic.h +++ b/src/merge/pr_generic.h @@ -94,6 +94,8 @@ enum default_track_priority_e { #define FMT_TID "'%s' track %lld: " struct packet_t { + static int64_t packet_number_counter; + KaxBlockGroup *group; KaxBlock *block; KaxCluster *cluster; @@ -113,7 +115,7 @@ struct packet_t { group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), ref_priority(0), time_factor(1), timecode(0), bref(0), fref(0), duration(0), - packet_num(0), + packet_num(packet_number_counter++), assigned_timecode(0), unmodified_assigned_timecode(0), unmodified_duration(0), duration_mandatory(false), superseeded(false), gap_following(false), @@ -128,7 +130,7 @@ struct packet_t { ref_priority(0), time_factor(1), timecode(n_timecode), bref(n_bref), fref(n_fref), duration(n_duration), - packet_num(0), + packet_num(packet_number_counter++), assigned_timecode(0), unmodified_assigned_timecode(0), unmodified_duration(0), duration_mandatory(false), superseeded(false), gap_following(false), @@ -143,7 +145,7 @@ struct packet_t { ref_priority(0), time_factor(1), timecode(n_timecode), bref(n_bref), fref(n_fref), duration(n_duration), - packet_num(0), + packet_num(packet_number_counter++), assigned_timecode(0), unmodified_assigned_timecode(0), unmodified_duration(0), duration_mandatory(false), superseeded(false), gap_following(false),