diff --git a/packager/media/formats/mp4/mp4_muxer.cc b/packager/media/formats/mp4/mp4_muxer.cc index 947e36f2c3..c31cba5c8e 100644 --- a/packager/media/formats/mp4/mp4_muxer.cc +++ b/packager/media/formats/mp4/mp4_muxer.cc @@ -692,10 +692,7 @@ uint64_t MP4Muxer::IsoTimeNow() { const uint64_t kIsomTimeOffset = 2082844800l; // Get the current system time since January 1, 1970, in seconds. - std::chrono::system_clock::duration duration = - std::chrono::system_clock::now().time_since_epoch(); - std::int64_t secondsSince1970 = - std::chrono::duration_cast(duration).count(); + std::int64_t secondsSince1970 = Now(); // Add the offset of seconds between January 1, 1970, and January 1, 1904. return secondsSince1970 + kIsomTimeOffset; diff --git a/packager/packager.cc b/packager/packager.cc index 5068d7f3b4..8f0196322d 100644 --- a/packager/packager.cc +++ b/packager/packager.cc @@ -942,6 +942,7 @@ Status Packager::Initialize( media::MuxerFactory muxer_factory(packaging_params); if (packaging_params.test_params.inject_fake_clock) { + internal->fake_clock.reset(new media::FakeClock()); muxer_factory.OverrideClock(internal->fake_clock); }