diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-04-22 21:39:03 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-22 21:39:03 +0200 |
| commit | 764c35279cf79e96a9d738ad86625bc3137fc8d7 (patch) | |
| tree | 0f778d72bc5c8bb74dfbacd07ea570b15eaf28d7 /src/lib/util.cc | |
| parent | a046e7fedb6d6e6703e36999fc6b6183252f0438 (diff) | |
| parent | b74f594ce1dee47fdb5cbeebdc3d6577cdd1cab8 (diff) | |
Merge branch 'mpeg2' into v2.17.xv2.17.16
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"); } |
