bluetooth/gst: Timestamp encoding buffers according to PA clock

Commit c6d6ca541 ("bluetooth/gst: Replace buffer accumulation in adapter
with direct pull") removed the `timestamp` parameter from GStreamer
transcoders due to being unused, but these should instead be propagated
to the GStreamer encoding buffers.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/494>
This commit is contained in:
Marijn Suijten 2021-10-21 09:29:19 +02:00 committed by Arun Raghavan
parent 5f37914eb8
commit 5af2afba85
4 changed files with 14 additions and 5 deletions

View file

@ -411,7 +411,7 @@ static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t
return 0;
}
written = gst_transcode_buffer(codec_info, input_buffer, input_size, output_buffer + sizeof(*header) + sizeof(*payload), output_size - sizeof(*header) - sizeof(*payload), processed);
written = gst_transcode_buffer(codec_info, timestamp, input_buffer, input_size, output_buffer + sizeof(*header) + sizeof(*payload), output_size - sizeof(*header) - sizeof(*payload), processed);
if (PA_UNLIKELY(*processed != input_size))
pa_log_error("LDAC encoding error");