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

obs-ffmpeg: Fix for FFmpeg 6 deprecating a flag #8376

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

pkviet
Copy link
Member

@pkviet pkviet commented Feb 28, 2023

Description

Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed by avcodec 60 [1]. We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
FFmpeg/FFmpeg@3ceffe7

Motivation and Context

Allow compilation of obs with FFmpeg 6.
Fixes #8375

How Has This Been Tested?

Tested with FFmpeg master as of Feb. 28 2023 (67fd1b79 libavcodec/hevc: remove duplicate semicolon in hevcdsp_init_neon).
Obs compiles fine with the new dlls.
Checked that Media Source works.
Checked that recording works (to mkv).
Checked that remuxing works (to mp4).
Checked that streaming to Twitch still works.

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.

@pkviet pkviet added the Bug Fix Non-breaking change which fixes an issue label Feb 28, 2023
@tytan652
Copy link
Collaborator

It didn't deprecated it, it dropped it FFmpeg/FFmpeg@3ceffe7.

@pkviet
Copy link
Member Author

pkviet commented Feb 28, 2023

It didn't deprecated it, it dropped it FFmpeg/FFmpeg@3ceffe7.

oh thanks, i'll correct

Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed in avcodec 60 [1].
We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
FFmpeg/FFmpeg@3ceffe7

Signed-off-by: pkv <pkv@obsproject.com>
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

AV_CODEC_CAP_TRUNCATED has been removed in ffmpeg 6
4 participants