Fix build against ffmpeg 9 by using av_parser_parse2() - #382
Merged
Conversation
ffmpeg 9 made AVCodecParser::parser_parse private, so the direct call in FFmpegStream::ParsePacket() no longer compiles. Kodi core hit this in the same function and moved to the public av_parser_parse2() in xbmc/xbmc@c4913a2 (the ffmpeg 8.1 bump). This code came from core originally (07ea26d), so do the same here: drop the parser_parse guard, check m_codecCtx in the outer if instead, and bail out if av_parser_parse2() fails. PARSER_FLAG_COMPLETE_FRAMES stays set, so behaviour is unchanged. Fixes xbmc#381 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Decision: APPROVE Issues: none Evidence:
Review Details
|
kel-mo
added a commit
to kel-mo/tv.kodi.Kodi
that referenced
this pull request
Aug 10, 2026
ffmpeg 9 made AVCodecParser.parser_parse private. Use the public av_parser_parse2() instead, as kodi core already does. xbmc/inputstream.ffmpegdirect#381 xbmc/inputstream.ffmpegdirect#382
kel-mo
added a commit
to kel-mo/tv.kodi.Kodi
that referenced
this pull request
Aug 12, 2026
ffmpeg 9 made AVCodecParser.parser_parse private. Use the public av_parser_parse2() instead, as kodi core already does. xbmc/inputstream.ffmpegdirect#381 xbmc/inputstream.ffmpegdirect#382
Contributor
|
Some CI still failing. Linux failing to link with libiconv? Win ARM64 didn't work before, we can disable that temporarily to not break the Jenkins release build. |
Contributor
Author
|
LE and flatpak picked up the patch, and it is building on flatpak; I haven't looked into the CI here yet... |
Contributor
|
We should get this merged before B2 is released, likely this weekend. The CI failures don't affect Jenkins - see if you can fix them, but we can release even if they're still failing. |
Contributor
|
Jenkins is green, and that's what we care about, so I'll pull this in. Thanks for the fix! |
Contributor
|
I've released v22.2.7 with this fix. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ffmpeg 9 made
AVCodecParser::parser_parseprivate, so the direct call inFFmpegStream::ParsePacket()no longer compiles.Kodi core hit this in the same function and moved to the public
av_parser_parse2()in xbmc/xbmc@c4913a2 (the ffmpeg 8.1 bump). This code camefrom core originally (07ea26d), so this does the same here:
if (parser->second->m_parserCtx->parser->parser_parse)guard andcheck
m_codecCtxin the outerifinsteadconst uint8_t* outbufptr->uint8_t* outbufptrav_parser_parse2()and return early if it failsPARSER_FLAG_COMPLETE_FRAMESstays set, so behaviour is unchanged. The resultmatches core's current
CDVDDemuxFFmpeg::ParsePacket().Builds and runs against ffmpeg 9.0.
Fixes #381
🤖 Generated with Claude Code