Skip to content

Bug 2081651 - Update the ffmpeg58 version.h headers to FFmpeg 4.4.1. - #390

Closed
WhisperinCheetah wants to merge 1 commit into
mozilla-firefox:mainfrom
WhisperinCheetah:bug-2081651
Closed

WhisperinCheetah wants to merge 1 commit into
mozilla-firefox:mainfrom
WhisperinCheetah:bug-2081651

Conversation

@WhisperinCheetah

@WhisperinCheetah WhisperinCheetah commented Oct 14, 2026 •

Copy link
Copy Markdown

Bug 1745284 updated the bundled ffmpeg58 libavcodec headers to 4.4.1 but
left libavcodec/version.h and libavutil/version.h at 4.0. Those do not
define FF_API_OLD_ENCDEC, FF_API_THREAD_SAFE_CALLBACKS, FF_API_DEBUG_MV or
FF_API_BUFFER_SIZE_T, so Firefox's build of AVCodecContext lacks fields a
system libavcodec 58 has, and qcompress through rc_override_count sit 4
bytes early (qmin at 472 instead of 476). The encoder's qmin=10/qmax=35
reach libx264 as qmin=35 and no qmax, so WebCodecs H.264 ignores the
requested bitrate. AVPacketSideData.size is also size_t instead of int.

With the 4.4.1 version.h files, AVCodecContext, AVCodec, AVPacket,
AVPacketSideData, AVCodecParameters, AVFrame, AVFrameSideData,
AVCodecHWConfig and AVHWFramesContext match FFmpeg 4.4's layouts exactly.

This also defines FF_API_THREAD_SAFE_CALLBACKS, so FFmpegVideoDecoder now
sets thread_safe_callbacks = 1 with libavcodec 58, as it already does
with libavcodec 59.


Lando: link
Bugzilla: bug 2081651

⚠️ This pull request has 3 warnings.
🚫 This pull request has 2 blockers.

Bug 1745284 updated the bundled ffmpeg58 libavcodec headers to 4.4.1 but
left libavcodec/version.h and libavutil/version.h at 4.0. Those do not
define FF_API_OLD_ENCDEC, FF_API_THREAD_SAFE_CALLBACKS, FF_API_DEBUG_MV or
FF_API_BUFFER_SIZE_T, so Firefox's build of AVCodecContext lacks fields a
system libavcodec 58 has, and qcompress through rc_override_count sit 4
bytes early (qmin at 472 instead of 476). The encoder's qmin=10/qmax=35
reach libx264 as qmin=35 and no qmax, so WebCodecs H.264 ignores the
requested bitrate. AVPacketSideData.size is also size_t instead of int.

With the 4.4.1 version.h files, AVCodecContext, AVCodec, AVPacket,
AVPacketSideData, AVCodecParameters, AVFrame, AVFrameSideData,
AVCodecHWConfig and AVHWFramesContext match FFmpeg 4.4's layouts exactly.

This also defines FF_API_THREAD_SAFE_CALLBACKS, so FFmpegVideoDecoder now
sets thread_safe_callbacks = 1 with libavcodec 58, as it already does
with libavcodec 59.
@firefoxci-taskcluster

Copy link
Copy Markdown
No Taskcluster jobs started for this pull request

The allowPullRequests configuration for this repository (in .taskcluster.yml on the default branch) does not allow starting tasks for this pull request.

@github-actions

Copy link
Copy Markdown
Contributor

(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html

@github-actions github-actions Bot closed this Oct 14, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 14, 2026
@lando-web
lando-web Bot requested a review from a team October 14, 2026 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant