Closed SteveMcFarlin closed 1 year ago
lgtm thanks :)
Shouldn't this be using BPF
instead of BPS
?
@heftig I am not sure of the answer here. You might want to open an issue if you think BPF is the right choice.
Why would BPF
be correct here? The third parameter to gst_buffer_add_audio_meta
is a number of samples no?
gst_buffer_add_audio_meta
expects the number of samples in the buffer. The wording is a bit ambiguous, but the example given for non-interleaved layout makes it clear that the buffer size should be equal to channels * samples * sample_stride
.
BPS
produces the bytes per sample (the sample_stride
), while BPF
produces the bytes per frame (channels * sample_stride
).
So in the case of a non-mono stream I'd expect the meta to still be broken.
Please see my answer here
It looks like issue #73 was never addressed. This PR has the suggested fix.