Skip to content

Conversation

tage64
Copy link

@tage64 tage64 commented Jun 14, 2022

This pull request fixes two bugs:

  • The size of a plane created by frame::Audio::plane() for a packed audio frame with more than one channel was incorrectly set to the number of samples. It is now changed to be the number of samples times the number of channels.
  • The size of the slice created by frame::Audio::data(n) for n > 0 was incorrectly set to 0. It is now changed to be the same as for n=0.

Some explanations can be found at the doxygen documentation for AVFrame.
In particular:

◆ linesize

int AVFrame::linesize[AV_NUM_DATA_POINTERS]
...
For audio, only linesize[0] may be set. For planar audio, each channel plane must be the same size.

@sagudev
Copy link

sagudev commented Aug 10, 2022

I just tested myself and can confirm that plane() is now working as intended.

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.

2 participants