Skip to content

encoder-ffmpeg.cpp: Remove legacy API usage#783

Merged
Xaymar merged 2 commits into
Vhonowslend:masterfrom
pencels:master
Feb 24, 2022
Merged

encoder-ffmpeg.cpp: Remove legacy API usage#783
Xaymar merged 2 commits into
Vhonowslend:masterfrom
pencels:master

Conversation

@pencels

@pencels pencels commented Feb 24, 2022

Copy link
Copy Markdown
Contributor

Explain the Pull Request

The build breaks if compiling against newer versions of ffmpeg which do not define the FF_API_NEXT macro and have fully removed the av_codec_next() API. It would only make sense to use av_codec_next() if FF_API_NEXT is still defined, so I flipped the condition on the preprocessor statement.

From what it seems, this could be a latent bug. I'm not too familiar with how the CI/CD on this repo works, but depending on the version of ffmpeg it sources, this issue could show up in builds in the future.

Checklist

  • I will become the maintainer for this part of code.
  • I have tested this code on all supported Platforms.
    • Linux
    • Windows
    • MacOS

The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API. It would only make sense to use av_codec_next() if FF_API_NEXT is still defined, so I flipped the condition on the preprocessor statement.
@pencels pencels requested a review from Xaymar as a code owner February 24, 2022 18:20
@Xaymar

Xaymar commented Feb 24, 2022

Copy link
Copy Markdown
Contributor

I think it makes more sense to completely remove the deprecated path entirely. The minimum FFmpeg version for StreamFX was always 4.2, which already has av_codec_iterate, so nothing changes in intended behavior. No need to drag compatibility support code far past its needed lifetime.

@Xaymar Xaymar added the enhancement Enhancements label Feb 24, 2022
Comment thread source/encoders/encoder-ffmpeg.cpp
@pencels pencels changed the title encoder-ffmpeg.cpp: flip FF_API_NEXT conditional encoder-ffmpeg.cpp: Remove legacy API usage Feb 24, 2022
@Xaymar Xaymar merged commit 02a41f2 into Vhonowslend:master Feb 24, 2022
Xaymar pushed a commit that referenced this pull request Feb 26, 2022
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Feb 26, 2022
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Feb 26, 2022
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
@Xaymar Xaymar removed the enhancement Enhancements label Jul 30, 2022
Xaymar pushed a commit that referenced this pull request Mar 27, 2023
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Mar 28, 2023
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Mar 28, 2023
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Apr 5, 2023
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
Xaymar pushed a commit that referenced this pull request Apr 5, 2023
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
@Xaymar Xaymar added this to the FFmpeg Encoders (Component) milestone Dec 11, 2023
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