From f4d3ce3d6e4857c0a38c19c623b1a7d54ccdf521 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 18 Feb 2024 07:30:26 +0100 Subject: [PATCH] test6: disable code with bogus Block ownership Both the Cluster and the reference handler think they own the block. (cherry picked from commit 49f0e3324aa71fd89797f126bafb9bcc6426adcd) --- test/mux/test6.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/mux/test6.cpp b/test/mux/test6.cpp index a7cba11d..0e9920ea 100644 --- a/test/mux/test6.cpp +++ b/test/mux/test6.cpp @@ -252,7 +252,7 @@ int main(int argc, char **argv) KaxBlockBlob *Blob2 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE); Blob2->SetBlockGroup(*MyNewBlock); AllCues.AddBlockBlob(*Blob2); - +#if 0 // bogus ownership // frame with a past reference DataBuffer *data4 = new DataBuffer((binary *)"tttyyy", countof("tttyyy")); Clust1.AddFrame(MyTrack1, 300 * TIMECODE_SCALE, *data4, MyNewBlock, *MyLastBlockTrk1); @@ -272,7 +272,7 @@ int main(int argc, char **argv) Blob3->SetBlockGroup(*MyLastBlockTrk1); AllCues.AddBlockBlob(*Blob3); //AllCues.UpdateSize(); - +#endif // simulate the writing of the stream : // - write an empty element with enough size for the cue entry // - write the cluster(s) @@ -288,7 +288,11 @@ int main(int argc, char **argv) Clust2.EnableChecksum(); DataBuffer *data2 = new DataBuffer((binary *)"tttyyy", countof("tttyyy")); +#if 0 // bogus ownership Clust2.AddFrame(MyTrack1, 350 * TIMECODE_SCALE, *data2, MyNewBlock, *MyLastBlockTrk1); +#else + Clust2.AddFrame(MyTrack1, 350 * TIMECODE_SCALE, *data2, MyNewBlock); +#endif KaxBlockBlob *Blob4 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE); Blob4->SetBlockGroup(*MyNewBlock); @@ -381,10 +385,12 @@ int main(int argc, char **argv) #endif // OLD out_file.close(); +#if 0 // bogus ownership delete Blob1; delete Blob2; delete Blob3; delete Blob4; +#endif } catch (exception & Ex) {