Fix assertion failure when content has more than one audio stream.
authorCarl Hetherington <cth@carlh.net>
Sun, 2 Sep 2018 01:39:30 +0000 (02:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 2 Sep 2018 01:39:30 +0000 (02:39 +0100)
src/lib/audio_content.cc

index f3212ca7a3dea3f3bb56c52d66a7b020a60b4179..59ba992ad2058a7117bc0f29ed128a755fb1b2ce 100644 (file)
@@ -405,5 +405,7 @@ AudioContent::modify_position (DCPTime& pos) const
 void
 AudioContent::modify_trim_start (ContentTime& trim) const
 {
-       trim = trim.round (stream()->frame_rate());
+       DCPOMATIC_ASSERT (!_streams.empty());
+       /* XXX: we're in trouble if streams have different rates */
+       trim = trim.round (_streams.front()->frame_rate());
 }