0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

libobs: Fix paired audio encoder discarding one segment

On audio encoder startup, audio encoders paired with a video encoder
would unintentionally discard a single audio data segment, causing it to
be 1024 audio frames out of sync.
This commit is contained in:
jp9000 2017-09-28 05:58:04 -07:00
parent 05fb67717e
commit 2f04010a4a

View File

@ -952,7 +952,6 @@ static bool buffer_audio(struct obs_encoder *encoder, struct audio_data *data)
/* use currently buffered audio instead */
if (v_start_ts < data->timestamp) {
start_from_buffer(encoder, v_start_ts);
goto skip_push;
}
} else if (!encoder->start_ts && !encoder->paired_encoder) {
@ -962,7 +961,6 @@ static bool buffer_audio(struct obs_encoder *encoder, struct audio_data *data)
fail:
push_back_audio(encoder, data, size, offset_size);
skip_push:
profile_end(buffer_audio_name);
return success;
}