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

win-dshow: Fix compiling with FFmpeg 7.0 #10601

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

RytoEX
Copy link
Member

@RytoEX RytoEX commented Apr 26, 2024

Description

Use "new" (FFmpeg 5.1+) channel layout API as needed.

Motivation and Context

Want to be able to compile against FFmpeg 7.0.

Follow-up to:

How Has This Been Tested?

Built locally on Windows 11. I'm not clear on how to activate this code path, so further review would be appreciated.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@RytoEX RytoEX added the Bug Fix Non-breaking change which fixes an issue label Apr 26, 2024
@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone Apr 26, 2024
@RytoEX RytoEX requested review from derrod and pkviet April 26, 2024 01:58
@RytoEX RytoEX self-assigned this Apr 26, 2024
Copy link
Member

@pkviet pkviet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is correct.
Sidenote left here for the sake of documenting it:
However the original code is not ideal because it assumes a given number of channel is enough to set the layout.
For instance, if the source has octogonal audio (8.0), it should be resampled first to 7.1 since obs only knows 7.1.
Another example is the various 5.1 arrangements (5.1 side, 5.1 wideback, 5.1 back ...) which will be treated as identical to our 5.1.
So the right call would be to call a swresampler instead of assuming the layout is ours.
BUT in practice this is exceedingly rare; we use the most common layouts so let's keep the code simple.

@RytoEX RytoEX merged commit e693f64 into obsproject:master Apr 30, 2024
14 checks passed
@RytoEX RytoEX deleted the fix-ffmpeg7-build branch April 30, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants