From f4fda1d705adfca0b7c8d3748c0c9df8e9da51bc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 23 Mar 2023 00:29:40 +0100 Subject: Fix crashes when using templates in some cases (#2491). If a template had content with N audio channels there would be various problems if content with c) size_t j = 0; while (i < _streams.size() && j < c->_streams.size()) { - _streams[i]->set_mapping (c->_streams[j]->mapping()); + auto mapping = _streams[i]->mapping(); + mapping.take_from(c->_streams[j]->mapping()); + _streams[i]->set_mapping(mapping); ++i; ++j; } -- cgit v1.2.3