Skip to content

Commit

Permalink
Fix save audio crash
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Dec 14, 2019
1 parent c397579 commit 3f1f415
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion replay-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ bool audio_input_callback(void *param, uint64_t start_ts_in, uint64_t end_ts_in,
.timestamp -
context->saving_replay
.first_frame_timestamp));
if (start_point2 >= AUDIO_OUTPUT_FRAMES) {
if (start_point2 >= context->saving_replay.audio_frames[i].frames) {
i++;
continue;
}
Expand All @@ -1214,6 +1214,9 @@ bool audio_input_callback(void *param, uint64_t start_ts_in, uint64_t end_ts_in,
.data[ch];
register float *end;

if (!aud)
continue;

aud += start_point2;
mix += start_point;
end = aud + total_floats;
Expand Down

0 comments on commit 3f1f415

Please sign in to comment.