diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-14 18:13:46 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-10-15 22:33:26 +0200 |
| commit | 5ed395b220ec5e0b1ee4399b94687990f683ec64 (patch) | |
| tree | 7eddc126c223332749ee0f5617902097ce803822 | |
| parent | a70960cdd8cdad8b011e5eafa2a4a1ad849011ae (diff) | |
Cleanup: compress an if and use a make_shared.
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index e0c817934..1b909a424 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -115,8 +115,7 @@ FFmpegContent::FFmpegContent(cxml::ConstNodePtr node, boost::optional<boost::fil } } - auto const f = node->optional_number_child<ContentTime::Type> ("FirstVideo"); - if (f) { + if (auto const f = node->optional_number_child<ContentTime::Type>("FirstVideo")) { _first_video = ContentTime (f.get ()); } @@ -264,7 +263,7 @@ FFmpegContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool to auto examiner = make_shared<FFmpegExaminer>(shared_from_this (), job); if (examiner->has_video ()) { - video.reset (new VideoContent (this)); + video = make_shared<VideoContent>(this); video->take_from_examiner(film, examiner); } |
