diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-04-07 23:44:12 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-22 13:03:04 +0200 |
| commit | 03a6be002b24e6cbb998d31a5cf4703de6196aa2 (patch) | |
| tree | 6e336129cf81dc89e9b75cacd229efc920d99942 /src/lib/util.cc | |
| parent | ad222a78a4124ef861ed9bc9528581ddccef3b36 (diff) | |
Use mpeg2 prefix for MPEG2 video asset filenames.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 60117f61d..b727d7b68 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -56,6 +56,7 @@ #include <dcp/file.h> #include <dcp/filesystem.h> #include <dcp/locale_convert.h> +#include <dcp/mpeg2_picture_asset.h> #include <dcp/picture_asset.h> #include <dcp/raw_convert.h> #include <dcp/scope_guard.h> @@ -103,6 +104,7 @@ LIBDCP_ENABLE_WARNINGS using std::bad_alloc; using std::cout; +using std::dynamic_pointer_cast; using std::endl; using std::istream; using std::list; @@ -748,9 +750,10 @@ asset_filename (shared_ptr<dcp::Asset> asset, string type, int reel_index, int r string -video_asset_filename (shared_ptr<dcp::PictureAsset> asset, int reel_index, int reel_count, optional<string> summary) +video_asset_filename(shared_ptr<dcp::PictureAsset> asset, int reel_index, int reel_count, optional<string> summary) { - return asset_filename(asset, "j2c", reel_index, reel_count, summary, ".mxf"); + string type = dynamic_pointer_cast<dcp::MPEG2PictureAsset>(asset) ? "mpeg2" : "j2c"; + return asset_filename(asset, type, reel_index, reel_count, summary, ".mxf"); } |
