- handler->add_export_config (*ts_it, channel_config, (*format_it)->format, (*filename_it)->filename);
+
+ boost::shared_ptr<BroadcastInfo> b;
+ if ((*format_it)->format->has_broadcast_info()) {
+ b.reset (new BroadcastInfo);
+ b->set_from_session (session, (*ts_it)->get_start());
+ }
+
+ // ...and each channel config
+ filename->include_channel_config = (channel_configs.size() > 1);
+ for(ChannelConfigStateList::iterator cc_it = channel_configs.begin(); cc_it != channel_configs.end(); ++cc_it) {
+ handler->add_export_config (*ts_it, (*cc_it)->config, (*format_it)->format, filename, b);
+ }