Debian Patches

Status for ffmpeg/7:9.0.2-2

Patch Description Author Forwarded Bugs Origin Last update
0001-avcodec-opus-rc-zero-the-unused-bytes-of-an-encoded-.patch avcodec/opus/rc: zero the unused bytes of an encoded frame
When the range coded data and the raw bits of a frame did not meet, the
bytes between them were copied from the stale contents of the range
coder buffer, and when there were no raw bits, the bytes after the range
coded data were left as whatever the packet buffer held. Zero them
instead, like libopus does.

(cherry picked from commit 574c34228cb1bb8e4aaec3f2d9ffaa90aad2e06f)
Lynne <dev@lynne.ee> no 2026-09-23
0002-avcodec-opus-enc-fix-the-input-setup-of-frames-short.patch avcodec/opus/enc: fix the input setup of frames shorter than frame_size

The overlap of a frame is the tail of the previous frame as it was
encoded, which was zero padded if the input frame was shorter than
frame_size. The last CELT_OVERLAP input samples were copied instead,
so when the last input frame was short and a frame followed it to flush
its overlap, the end of the stream was distorted.

The padding of a short input frame was also written at the start of the
sample buffer instead of after the input frame's samples.

(cherry picked from commit 7e1bc799b2c36add077e1077b2eba8e2678294ff)
Lynne <dev@lynne.ee> no 2026-09-23
0003-avcodec-opus-enc-fix-the-pre-emphasis-filter-state-b.patch avcodec/opus/enc: fix the pre-emphasis filter state between frames
The trailing CELT_OVERLAP samples of a frame are filtered again as the
overlap of the next frame, so the filter state saved for the next frame
has to be the one from right before them. The code relied on packets
being assembled from 120 sample input frames for this, which is no
longer the case since c3aea7628c, and saved the state from the end of
the previous frame instead. The first overlap sample of every frame was
then filtered differently than when it was encoded as part of the
previous frame.

(cherry picked from commit 49975b25a0c7986b3b10eef209018e097cb430f3)
Lynne <dev@lynne.ee> no 2026-09-23
0004-avcodec-opus-enc-signal-silence-explicitly.patch avcodec/opus/enc: signal silence explicitly
Silent frames were coded with zero bytes, which decoders take as a lost
frame and conceal by extrapolating the preceding audio, rather than
outputting silence. A packet of such frames is also only one or two
bytes long, and the MPEG-TS muxer rejects packets shorter than two.

Code the silence flag in a two byte frame like libopus does, and keep
the encoder state in sync with the decoder after it: the decoder
predicts the band energies of the next frame from CELT_ENERGY_SILENCE,
and the pre-emphasis filter state at the start of the next overlap is
zero. As silent frames no longer have a size of zero, leave them out of
the rate control explicitly.

(cherry picked from commit b726a3b8c48f0945a9fbee9a308e7b22b183db5c)
Lynne <dev@lynne.ee> no 2026-09-23
0005-avcodec-opus-enc_psy-don-t-make-the-last-frame-silen.patch avcodec/opus/enc_psy: don't make the last frame silent at EOF
816d74e0bb made frames without psy analysis at EOF silent. The frame
that follows the last input frame to flush its MDCT overlap is always
such a frame, so the last CELT_OVERLAP samples of the stream were lost
whenever it was needed, i.e. when the length of the stream is a
multiple of frame_size or less than CELT_OVERLAP samples short of one.
It was also coded as a one byte packet, which the MPEG-TS muxer
rejects.

Encode it like any other frame instead. Its psy analysis data is
zeroed, which leaves it with the default frame parameters.

(cherry picked from commit 2e0a770b8e63911cdbca40dcbd3ba279f99d23f5)
Lynne <dev@lynne.ee> no 2026-09-23

All known versions for source package 'ffmpeg'

Links