Fix some potentially uninitialized variables

This commit is contained in:
Robin Gareus 2022-05-07 04:12:46 +02:00
parent f5b280a850
commit 46117303da
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 5 additions and 6 deletions

View File

@ -72,10 +72,8 @@ Filter::make_new_sources (boost::shared_ptr<Region> region, SourceList& nsrcs, s
}
try {
samplecnt_t sample_rate;
if (use_session_sample_rate) {
sample_rate = session.sample_rate();
} else {
samplecnt_t sample_rate = session.sample_rate ();
if (!use_session_sample_rate) {
boost::shared_ptr<AudioRegion> aregion = boost::dynamic_pointer_cast<AudioRegion>(region);
if (aregion) {

View File

@ -2440,8 +2440,9 @@ TempoMap::set_state (XMLNode const & node, int version)
/* XXX this should probably be at the global level in the session file because it affects a lot more than just the tempo map, potentially */
superclock_t sc;
node.get_property (X_("superclocks-per-second"), sc);
set_superclock_ticks_per_second (sc);
if (node.get_property (X_("superclocks-per-second"), sc)) {
set_superclock_ticks_per_second (sc);
}
node.get_property (X_("time-domain"), _time_domain);