Commit Graph

311 Commits

Author SHA1 Message Date
openvela-robot 05fe89a970 lavd/opengl_enc: Support BGR48. 2026-04-20 19:08:19 +08:00
openvela-robot 9a8e0306a8 matroskaenc: factor ts_offset into block timecode computation
ts_offset was added to cluster timecode, but then effectively subtracted
back off the block timecode

When setting initial_padding for an audio stream, the timestamps are
written incorrectly to the mkv file.  cluster timecode gets written
as pts0 + ts_offset which is correct, but then block timecode gets
written as pts - cluster timecode which expanded is
pts - (pts0 + ts_offset).  Adding cluster and block tc back together:
cluster + block = (pts0 + ts_offset) + (pts - (pts0 + ts_offset)) = pts
But the result should be pts + ts_offset since demux will subtract the
CodecDelay element from pts and set initial_padding to CodecDelay.
This patch gives the correct result.
2026-04-20 19:08:16 +08:00
openvela-robot f6ea469a16 avformat/hlsenc: fix cid 1401346 Dereferencing pointer error
check if proto is null before av_strcasecmp
CID:  1401346

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2026-04-20 19:08:12 +08:00
openvela-robot 6f9d0abff0 build: Drop leftover reference to old EXAMPLES logic 2026-04-20 19:08:09 +08:00
openvela-robot 443856bdac avcodec/nvenc: allow forcing keyframes by default 2026-04-20 19:08:05 +08:00
openvela-robot 0a74ed87f2 configure: Explicitly spell out first require_pkg_config() parameter
This is less confusing than encountering "" in the argument list.
2026-04-20 19:07:54 +08:00
openvela-robot 1f8d2ca7ab avcodec/pictordec: Do not read more than nb_planes
Fixes undefined behavior
Fixes: 622/clusterfuzz-testcase-5745722022428672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:07:48 +08:00
openvela-robot 3af3e76266 dv: Don't return EIO upon EOF 2026-04-20 19:07:46 +08:00
openvela-robot 70386d997e opusenc: initialize the emphasis coefficients on init
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:07:40 +08:00
openvela-robot 71067418e7 vf_deinterlace_vaapi: Create filter buffer after context
The Intel proprietary VAAPI driver enforces the restriction that a
buffer must be created inside an existing context, so just ensure
this is always true.
2026-04-20 19:07:38 +08:00
openvela-robot 990bf77324 lavc/vda_h264_dec.c Fix NULL pointer dereference
ps.sps_list entries may be NULL, so check before dereferencing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:07:34 +08:00
openvela-robot 03a54b95ff vf_fade: Make sure to not miss the last lines of a frame
When slice_h is rounded up due to chroma subsampling, there's
a risk that jobnr * slice_h exceeds frame->height.

Prior to a638e9184d, this wasn't an issue for the last slice
of a frame, since slice_end was set to frame->height for the last
slice.

a638e9184d tried to fix the case where other slices than the
last one would exceed frame->height (which can happen where the
number of slices/threads is very large compared to the frame
height).

However, the fix in a638e9184d instead broke other cases,
where slice_h * nb_threads < frame->height. Therefore, make
sure the last slice always ends at frame->height.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:07:31 +08:00
openvela-robot 1217af5f73 swr/aarch64: add missing ret to ff_resample_common_apply_filter_x8_float_neon 2026-04-20 19:07:28 +08:00
openvela-robot 68e4d25778 configure: Handle SDL version check through pkg-config 2026-04-20 19:07:25 +08:00
openvela-robot 0f33400874 opusenc: fix coarse energy quantization with 2 bits left
Fixes CID1400584

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:07:22 +08:00
openvela-robot 9925916650 avconv: Move rescale to stream timebase before monotonisation
If the stream timebase is coarser than the muxing timebase then the
monotonisation process may fail because adding one to the timestamp
need not actually produce a different timestamp after the rescale.
2026-04-20 19:07:19 +08:00
openvela-robot b381010255 opus_pvq: fix uninitialized variable usage
Fixes CID1400586

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:07:16 +08:00
openvela-robot 915d0ab882 libopenh264dec: Let the framework use the h264_mp4toannexb bitstream filter
This avoids a lot of boilerplate code within the decoder wrapper itself.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:07:13 +08:00
openvela-robot c4c5966137 adpcm: fix clipping for yamaha
According to specification max value allowed is 0x6000.
Fixes #5862.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:07:10 +08:00
openvela-robot 45a4a4d378 mov: Do not try to parse multiple stsd for the same track
Bug-Id: 1017
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:07:07 +08:00
openvela-robot 157170c0bb doc/protocols: add option usage description
Fixes ticket #6148.

Signed-off-by: Lou Logan <lou@lrcd.com>
2026-04-20 19:07:02 +08:00
openvela-robot fc1defe9d0 lavc: Add device context field to AVCodecContext
For use by codec implementations which can allocate frames internally.
2026-04-20 19:06:59 +08:00
openvela-robot e1d5d262b6 avcodec: add FM Screen Capture Codec decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:06:55 +08:00
openvela-robot 65aa808230 aac: Validate the sbr sample rate before using the value
Avoid a floating point exception.

Bug-Id: 1027
CC: libav-stable@libav.org
2026-04-20 19:06:52 +08:00
openvela-robot d3956f0756 lavf/omadec: Remove an unsed variable. 2026-04-20 19:06:49 +08:00
openvela-robot b445829464 configure: Move up the avbuild directory creation
The early check for inconsistent in-source vs out-of-source build
cannot generate a config.log otherwise.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:06:46 +08:00
openvela-robot 949bb9d217 avcodec: add ATRAC Advanced Lossless decoders
Only lossy part is decoded for now.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:06:43 +08:00
openvela-robot 5dacc884ef avio: add a destructor for AVIOContext
Before this commit, AVIOContext is to be freed with a plain av_free(),
which prevents us from adding any deeper structure to it.
2026-04-20 19:06:40 +08:00
openvela-robot 8779b5534c avformat/apetag: fix flag value to signal footer presence
According to the spec[1], a value of 0 means the footer is present and a value
of 1 means it's absent, the exact opposite of header presence flag where 1
means present and 0 absent.
The reason for this is compatibility with APEv1 tags, where there's no header,
footer presence was mandatory for all files, and the flags field was a zeroed
reserved field.

[1] http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:06:36 +08:00
openvela-robot a4cd493b97 mov: Rework stsc index validation
In order to avoid potential integer overflow change the comparison
and make sure to use the same unsigned type for both elements.
2026-04-20 19:06:33 +08:00
openvela-robot 16a288a167 avcodec/qdmc: silence gcc 6.2.0 warning
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:06:30 +08:00
openvela-robot 48a43faaaf hlsenc: Correctly write down all 16 bytes in hex
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:06:27 +08:00
openvela-robot e6a63e9305 lavf/mov.c: Avoid OOB in mov_read_udta_string()
Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (udta_string portion)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:06:24 +08:00
openvela-robot 9a1285a82c utvideodec: Add a missing include
This was missing from 77c23704c7, fixing building.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:06:09 +08:00
openvela-robot 23ae923998 avcodec/mjpegenc: Remove non functional huffman reallocation and error handling
If this is wanted iam not against it but it must be designed to work with all cases
like slice threads, and a single growing buffer does not work very well with slices.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:06:06 +08:00
openvela-robot d2dd2c373c avcodec: Mark some codecs with threadsafe init as such
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:06:03 +08:00
openvela-robot a020ff7f24 ffplay: change keyboard volume control to logarithmic
The command line parameter remains linear.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:05:58 +08:00
openvela-robot 2fe1a1b662 configure: Correctly recurse in do_check_deps()
Fixes all sorts of configuration problems introducec by dad7a9c7c0
on non-Linux or non-vanilla configs. Also removes a line made redundant
in that commit.
2026-04-20 19:05:56 +08:00
Mark Thompson 4f47e2a871 vaapi_encode: Add MPEG-2 support
(cherry picked from commit ca6ae3b77a)
2026-04-20 19:05:53 +08:00
openvela-robot 0c3d38b98c avcodec/pictordec: Fix logic error
Fixes: 559/clusterfuzz-testcase-6424225917173760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:05:51 +08:00
openvela-robot 7966340226 Use bitstream_init8() where appropriate 2026-04-20 19:05:48 +08:00
openvela-robot 588c4de169 configure: use dashes instead of slashes in lib.exe invocation
This avoids issues with wrong parameter translation by msys on some systems,
and the Windows SDK tools accept both forms equally.
2026-04-20 19:05:45 +08:00
openvela-robot 0fc3a50557 wma: Convert to the new bitstream reader 2026-04-20 19:05:42 +08:00
openvela-robot 503cbe6501 avcodec/mpc8: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:05:36 +08:00
openvela-robot 6dcf5385dc rtmp: Correctly handle the Window Acknowledgement Size packets
This swaps which field is set when the Window Acknowledgement Size
and Set Peer BW packets are received, renames the fields in
order to clarify their role further and adds verbose comments
explaining their respective roles and how well the code currently
does what it is supposed to.

The Set Peer BW packet tells the receiver of the packet (which
can be either client or server) that it should not send more data
if it already has sent more data than the specified number of bytes,
without receiving acknowledgement for them. Actually checking this
limit is currently not implemented.

In order to be able to check that properly, one can send the
Window Acknowledgement Size packet, which tells the receiver of the
packet that it needs to send Acknowledgement packets
(RTMP_PT_BYTES_READ) at least after receiving a given number of bytes
since the last Acknowledgement.

Therefore, when we receive a Window Acknowledgement Size packet,
this sets the maximum number of bytes we can receive without sending
an Acknowledgement; therefore when handling this packet we should set
the receive_report_size field (previously client_report_size).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:05:33 +08:00
openvela-robot 50bfbc45e6 avfilter/scale: refactor common code for scaling height/width expressions
Implements support for height/width expressions in vf_scale_vaapi,
by refactoring common code into a new libavfilter/scale.c

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:05:30 +08:00
openvela-robot 374fb35779 svq3: Convert to the new bitstream reader 2026-04-20 19:05:27 +08:00
openvela-robot 9fa7ea5d9f avcodec/dca_lbr: Fix off by 1 error in freq check
Fixes out of array read
Fixes: 510/clusterfuzz-testcase-5737865715646464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:05:24 +08:00
openvela-robot 02a42ad43d configure: Add proper weak dependency of drawtext filter on libfontconfig 2026-04-20 19:05:21 +08:00
openvela-robot 358c283457 Merge commit 'd639dcdae022130078c9c84b7b691c5e9694786c'
* commit 'd639dcdae022130078c9c84b7b691c5e9694786c':
  ratecontrol: Move Xvid-related functions to the place they are actually used

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:05:08 +08:00
openvela-robot beb3a2761e avconv: allow -b to be used with streamcopy
In this mode it tells the muxer about the bitrate of the input stream.
2026-04-20 19:05:05 +08:00
openvela-robot 669e2a09a5 MAINTAINERS: Add myself for boadec.c
It seems ive written this thing though i cannot really remember

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:04:51 +08:00
openvela-robot 69e54e5471 golomb: Convert to the new bitstream reader 2026-04-20 19:04:47 +08:00
openvela-robot 293a53db63 ircamdec: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 19:04:18 +08:00
openvela-robot 955415d61f dashenc: add support for assigning streams to AdaptationSets
Also makes sure all streams are assigned to exactly one AdaptationSet.

This patch is originally based partially on code by Vignesh Venkatasubramanian.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:04:15 +08:00
openvela-robot 3721a36217 avformat/mov: Fix integer truncation in mov_read_uuid()
Fixes Ticket6102

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:04:12 +08:00
openvela-robot b6a45d6d0a dashenc: add option to provide UTC timing source
If set, adds a UTCTiming tag in the manifest.

This is part of the recommendations listed in the "Guidelines for
Implementations: DASH-IF Interoperability Points" [1][2]
Section 4.7 describes means for the Availability Time Synchronization.

A usable default is "https://time.akamai.com/?iso"

[1] http://dashif.org/guidelines/
[2] http://dashif.org/wp-content/uploads/2016/12/DASH-IF-IOP-v4.0-clean.pdf
    (current version as of writing)

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:04:09 +08:00
openvela-robot e982e6747f lavfi: make ff_framequeue_skip_samples() more useful.
Instead of just updating statistics and leaving the work to the
call site, have it actually do the work.

Also: skip the samples by updating the frame data pointers
instead of moving the samples. More efficient and avoid writing
into shared frames.
Found-By: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 19:04:05 +08:00
openvela-robot 3d7ac5a234 rtmp: Account for bytes_read wraparound
Servers seem to be happy to receive the wrapped-around value as long
as they receive a report, otherwise they timeout.

Initially reported and analyzed by Thomas Bernhard.
2026-04-20 19:04:02 +08:00
openvela-robot e31a7561e9 doc/examples/decoder_targeted: Disable error concealment after 20 frames
This allows testing EC and non EC. Avoids spending most time in EC on
high res samples and reduces the likelyhood of hitting timeouts

Fixes: Timeout in 467/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_H263_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:03:59 +08:00
openvela-robot c8a6da62c6 vaapi_encode: Add MPEG-2 support 2026-04-20 19:03:56 +08:00