summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-24 23:55:56 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-24 23:57:22 +0000
commit800c0b9f95f422af66b6166fb4d13c1b89d04844 (patch)
treee9fe0b47ed8a73679540a1e7d82abec68d732eb2
parent3d15e81de19a57eb8c6a308e00ea07c542068b58 (diff)
Fix crash when changing DCP audio channel count.
Without this we ask the AudioMerger to merge new buffers with N channels with old buffers with M channels, which it can't do. I'm not convinced this is the best solution but I think it will do for now.
-rw-r--r--ChangeLog2
-rw-r--r--src/lib/player.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d6eda2d91..0d5a87216 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2018-03-24 Carl Hetherington <cth@carlh.net>
+ * Fix crash when changing DCP audio channel count (#1253).
+
* Fix update checker error when there is no test
version.
diff --git a/src/lib/player.cc b/src/lib/player.cc
index bd194c373..6ec593f6c 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -283,6 +283,8 @@ Player::film_changed (Film::Property p)
if (_film->audio_processor ()) {
_audio_processor = _film->audio_processor()->clone (_film->audio_frame_rate ());
}
+ } else if (p == Film::AUDIO_CHANNELS) {
+ _audio_merger.clear ();
}
}