-
Notifications
You must be signed in to change notification settings - Fork 649
ffmpeg: Replace deprecated and soon removed avcodec_close with avcodec_free_context in ffmpeg plugin. #4837
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
Collaborator
|
How far back is |
Contributor
Author
|
Not sure about version, but there is a changelog |
Collaborator
|
Our oldest is ffmpeg 4.0, which corresponds to 58.18.100, so I think we are safe. |
lgritz
approved these changes
Jul 23, 2025
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Jul 24, 2025
…c_free_context (AcademySoftwareFoundation#4837) avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years Global avcodec_close (AVCodecContext *avctx) Do not use this function. Use avcodec_free_context() to destroy a codec context (either open or closed). Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead. In ffmpeg master, it has already been removed. But still work in v7.1 We checked the ffmpeg changelog, and avcodec_free_context was added 7 years ago and should be present in ffmpeg 4.0, the oldest version we support. Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
zachlewis
pushed a commit
to zachlewis/OpenImageIO
that referenced
this pull request
Aug 1, 2025
…c_free_context (AcademySoftwareFoundation#4837) avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years Global avcodec_close (AVCodecContext *avctx) Do not use this function. Use avcodec_free_context() to destroy a codec context (either open or closed). Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead. In ffmpeg master, it has already been removed. But still work in v7.1 We checked the ffmpeg changelog, and avcodec_free_context was added 7 years ago and should be present in ffmpeg 4.0, the oldest version we support. Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 14, 2025
…c_free_context (AcademySoftwareFoundation#4837) avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years Global avcodec_close (AVCodecContext *avctx) Do not use this function. Use avcodec_free_context() to destroy a codec context (either open or closed). Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead. In ffmpeg master, it has already been removed. But still work in v7.1 We checked the ffmpeg changelog, and avcodec_free_context was added 7 years ago and should be present in ffmpeg 4.0, the oldest version we support. Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 15, 2025
…c_free_context (AcademySoftwareFoundation#4837) avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years Global avcodec_close (AVCodecContext *avctx) Do not use this function. Use avcodec_free_context() to destroy a codec context (either open or closed). Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead. In ffmpeg master, it has already been removed. But still work in v7.1 We checked the ffmpeg changelog, and avcodec_free_context was added 7 years ago and should be present in ffmpeg 4.0, the oldest version we support. Signed-off-by: Vlad (Kuzmin) Erium <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build / testing / port / CI
Affecting the build system, tests, platform support, porting, or continuous integration.
file formats
Image file formats, ImageInput, ImageOutput
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
avcodec_close (AVCodecContext *avctx) removing in ffmpeg 7.2 and was deprecated for couple years
Description
Global avcodec_close (AVCodecContext *avctx)
Do not use this function. Use avcodec_free_context() to destroy a codec context (either open or closed). Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead.
In ffmpeg master, it has already been removed. But still work in v7.1
Tests
Checklist:
need to update the documentation, for example if this is a bug fix that
doesn't change the API.)
(adding new test cases if necessary).
corresponding Python bindings (and if altering ImageBufAlgo functions, also
exposed the new functionality as oiiotool options).
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.