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

ffmpeg: Use ch_layout in favor of removed channel_layout and channels #1641

Closed
wants to merge 1 commit into from

Conversation

darktohka
Copy link
Contributor

@darktohka darktohka commented Mar 31, 2024

Issue description

In FFmpeg/FFmpeg@65ddc74, the channel_layout and channels members in AVCodecParameters and AVCodecContext were removed. This corresponds to the libavformat version 60.25.100.

They have been deprecated since libavformat version 59.18.101: FFmpeg/FFmpeg@548aeb9

The avcodec_close function has also been deprecated for a while, it is unnecessary to call both avcodec_close and avcodec_free_context.

Solution description

When compiling with a version older than 59.18.101, use the old channel_layout and channels members. For versions newer than 59.18.101, use the new ch_layout member.

Checklist

I have done my best to ensure that…

  • …I have familiarized myself with the CONTRIBUTING.md file
  • …this change follows the coding style and design patterns of the codebase
  • …I own the intellectual property rights to this code
  • …the intent of this change is clearly explained
  • …existing uses of the Panda3D API are not broken
  • …the changed code is adequately covered by the test suite, where possible.

@darktohka darktohka marked this pull request as draft March 31, 2024 13:03
@darktohka darktohka marked this pull request as ready for review March 31, 2024 13:17
@darktohka
Copy link
Contributor Author

The original version of this PR had a bug: it was not using the new chlayout interface for swresample. Now the API usage is fully corrected.

@rdb rdb added this to the 1.10.15 milestone Apr 8, 2024
@rdb rdb closed this in a920604 May 14, 2024
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.

None yet

2 participants