diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-09 00:33:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-09 00:33:02 +0100 |
| commit | 50c3d05526fdaf5fc05d687244fd9a6896394d14 (patch) | |
| tree | 0743accd1b5c4314dab73e7b3fd2da4546137433 /src | |
| parent | f5de2b9a95bed2c46f8d229554ca7fc16ade8319 (diff) | |
Fix assertion error when playing subtitle DCPs with OpenGL (#2929).
The player's _optimisation was not set up correctly, so it would give
PADDED images instead of COMPACT, raising an assertion in the OpenGL
renderer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 377c432ba..8660233e1 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -399,11 +399,12 @@ public: { DCPOMATIC_ASSERT (_film); - reset_film (); + auto film = std::make_shared<Film>(optional<boost::filesystem::path>()); + try { _stress.set_suspended (true); auto dcp = make_shared<DCPContent>(dir); - auto job = make_shared<ExamineContentJob>(_film, dcp); + auto job = make_shared<ExamineContentJob>(film, dcp); _examine_job_connection = job->Finished.connect(bind(&DOMFrame::add_dcp_to_film, this, weak_ptr<Job>(job), weak_ptr<Content>(dcp))); JobManager::instance()->add (job); bool const ok = display_progress(variant::wx::dcpomatic_player(), _("Loading content")); @@ -412,7 +413,7 @@ public: } Config::instance()->add_to_player_history (dir); if (dcp->video_frame_rate()) { - _film->set_video_frame_rate(dcp->video_frame_rate().get(), true); + film->set_video_frame_rate(dcp->video_frame_rate().get(), true); } switch (dcp->video_encoding()) { case VideoEncoding::JPEG2000: @@ -440,6 +441,8 @@ public: } catch (DCPError& e) { error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what())); } + + reset_film(film); } void add_dcp_to_film (weak_ptr<Job> weak_job, weak_ptr<Content> weak_content) |
