diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-02 18:23:36 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-02 18:23:36 +0200 |
| commit | 7d9e108ba3629b2e9120bc1da3354935c41aca37 (patch) | |
| tree | c8ffdb2bca75d62bfe9fa2262e9fc4cd19c45027 /tools/dcpdecryptmxf.cc | |
| parent | 6f98afd8021f9475bbd342bdcb39162b3167fa9e (diff) | |
WIP: more hacks.shared-ptr
Diffstat (limited to 'tools/dcpdecryptmxf.cc')
| -rw-r--r-- | tools/dcpdecryptmxf.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/dcpdecryptmxf.cc b/tools/dcpdecryptmxf.cc index 1145d77d..fe7a2261 100644 --- a/tools/dcpdecryptmxf.cc +++ b/tools/dcpdecryptmxf.cc @@ -82,7 +82,7 @@ void copy (T const& in, shared_ptr<U> writer, bool ignore_hmac) reader->set_check_hmac (!ignore_hmac); for (int64_t i = 0; i < in.intrinsic_duration(); ++i) { auto frame = reader->get_frame (i); - writer->write (frame->data(), frame->size()); + writer->write(frame.data(), frame.size()); } writer->finalize(); }; @@ -250,15 +250,15 @@ main (int argc, char* argv[]) reader->set_check_hmac(!ignore_hmac); for (int64_t i = 0; i < in.intrinsic_duration(); ++i) { auto frame = reader->get_frame(i); - std::vector<int32_t*> pointers(frame->channels()); - for (auto channel = 0; channel < frame->channels(); ++channel) { - pointers[channel] = new int32_t[frame->samples()]; - for (auto sample = 0; sample < frame->samples(); ++sample) { - pointers[channel][sample] = frame->get(channel, sample); + std::vector<int32_t*> pointers(frame.channels()); + for (auto channel = 0; channel < frame.channels(); ++channel) { + pointers[channel] = new int32_t[frame.samples()]; + for (auto sample = 0; sample < frame.samples(); ++sample) { + pointers[channel][sample] = frame.get(channel, sample); } } - writer->write(pointers.data(), frame->channels(), frame->samples()); - for (auto channel = 0; channel < frame->channels(); ++channel) { + writer->write(pointers.data(), frame.channels(), frame.samples()); + for (auto channel = 0; channel < frame.channels(); ++channel) { delete[] pointers[channel]; } } |
