remove odd namespacing typo
[ardour.git] / libs / ardour / session_ltc.cc
index 93368d6e612aec79e49b6d9a685108001bea9f34..f293970dd4087ba8e888ed80b5c722cc545966c8 100644 (file)
@@ -93,7 +93,8 @@ void
 Session::ltc_tx_cleanup()
 {
        DEBUG_TRACE (DEBUG::LTC, "LTC TX cleanup\n");
-       if (ltc_enc_buf) free(ltc_enc_buf);
+       free(ltc_enc_buf);
+       ltc_enc_buf = NULL;
        ltc_encoder_free(ltc_encoder);
        ltc_encoder = NULL;
 }
@@ -246,7 +247,7 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
        framepos_t cycle_start_frame = (current_speed < 0) ? (start_frame - ltc_out_latency.max) : (start_frame + ltc_out_latency.max);
 
        /* LTC TV standard offset */
-       cycle_start_frame += ltc_frame_alignment(nominal_frame_rate(), TV_STANDARD(cur_timecode));
+       cycle_start_frame -= ltc_frame_alignment(frames_per_timecode_frame(), TV_STANDARD(cur_timecode));
 
        /* cycle-start may become negative due to latency compensation */
        if (cycle_start_frame < 0) { cycle_start_frame = 0; }