Merge pull request #277 from fryshorts/fixes

Fix small bug in timestamp smoothing for audio sources
master
Jim 2014-10-09 13:34:35 -07:00
commit 9183c827c5
1 changed files with 2 additions and 2 deletions

View File

@ -730,11 +730,11 @@ static void source_output_audio_line(obs_source_t *source,
(source->next_audio_ts_min - in.timestamp) : (source->next_audio_ts_min - in.timestamp) :
(in.timestamp - source->next_audio_ts_min); (in.timestamp - source->next_audio_ts_min);
/* smooth audio if lower or within threshold */ /* smooth audio if within threshold */
if (diff > MAX_TIMESTAMP_JUMP) if (diff > MAX_TIMESTAMP_JUMP)
handle_ts_jump(source, source->next_audio_ts_min, handle_ts_jump(source, source->next_audio_ts_min,
in.timestamp, diff); in.timestamp, diff);
else if (ts_under || diff < TS_SMOOTHING_THRESHOLD) else if (diff < TS_SMOOTHING_THRESHOLD)
in.timestamp = source->next_audio_ts_min; in.timestamp = source->next_audio_ts_min;
} }