From 37a6adaddf8fd999e8794a26c0d519ca633ad0d7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 20 Dec 2004 19:13:19 +0000 Subject: [PATCH] packet_t is now a class and must be allocated with 'new'. --- src/merge/pr_generic.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/merge/pr_generic.cpp b/src/merge/pr_generic.cpp index 81068ba4c..b87060b0c 100644 --- a/src/merge/pr_generic.cpp +++ b/src/merge/pr_generic.cpp @@ -849,10 +849,9 @@ generic_packetizer_c::add_packet(memories_c &mems, if (reader->ptzr_first_packet == NULL) reader->ptzr_first_packet = this; - pack = (packet_t *)safemalloc(sizeof(packet_t)); - memset(pack, 0, sizeof(packet_t)); - pack->data_adds.clear(); + pack = new packet_t; pack->data_adds.resize(mems.size() - 1); + pack->data_adds_lengths.resize(mems.size() - 1); length = mems[0]->size; if (compressor != NULL) {