Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad audio metadata (issues #73) #75

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

SteveMcFarlin
Copy link

@SteveMcFarlin SteveMcFarlin commented Aug 2, 2023

It looks like issue #73 was never addressed. This PR has the suggested fix.

@MathieuDuponchelle
Copy link
Collaborator

lgtm thanks :)

@MathieuDuponchelle MathieuDuponchelle merged commit 7c71669 into centricular:master Aug 3, 2023
1 check passed
@heftig
Copy link

heftig commented Aug 15, 2023

Shouldn't this be using BPF instead of BPS?

@SteveMcFarlin
Copy link
Author

@heftig I am not sure of the answer here. You might want to open an issue if you think BPF is the right choice.

@MathieuDuponchelle
Copy link
Collaborator

Why would BPF be correct here? The third parameter to gst_buffer_add_audio_meta is a number of samples no?

@heftig
Copy link

heftig commented Aug 31, 2023

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.

@MathieuDuponchelle
Copy link
Collaborator

Please see my answer here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants