Commit Graph

10252 Commits

Author SHA1 Message Date
Martin Pulec
f9fa06c9ab acap/sdl_mixer: fix some leaks when init fails
- leaked Mix_Music (always)
- leaked req_filename when init fails (CID 472141)
2025-04-16 12:47:20 +02:00
Martin Pulec
509d50f0c7 vcap/rtsp: fix a leak in init
a typo, also a CID 472135
2025-04-16 12:47:20 +02:00
Martin Pulec
47d89b0c50 vdisp/aggregate: if init fails, clear with _done
CID 472127
2025-04-16 12:47:20 +02:00
Martin Pulec
dcb2f6c171 vdisp/aggregate: IWYU 2025-04-16 12:47:20 +02:00
Martin Pulec
c87df7ea2f vdisp/ndi: fix leaks when init fails
Handle the free with display_ndi_done (was adjusted to handle partial
destroy).

CID 472125
2025-04-16 12:47:19 +02:00
Martin Pulec
e4d5443336 vcap/testcard: if fail, del alloc data with _done
fixes CID 472124
2025-04-16 12:47:16 +02:00
Martin Piatka
7138a52881 aplay/pipewire: Set buffer frame count
This is optional and doesn't do anything by itself, but it's returned by
pipwire to the application in the pw_time struct as 'queued'.
2025-04-15 13:21:35 +02:00
Martin Piatka
b3b18f9175 aplay/pipewire: Prevent underruns by writing silence
This makes sure that pipewire always gets a steady stream of samples,
even when we're not receiving anything. This prevents the error count in
pw-top skyrocketing when the sender stops sending.
2025-04-15 13:21:29 +02:00
Martin Pulec
ce0eff8f20 acap/jack: print help early
fixes a leak with CID 472122

also avoid using alloca
2025-04-15 10:36:56 +02:00
Martin Pulec
e8ae7ebfcd jack: query the devices after help
Evantual error messages from audio_jack_probe will be better aligned
after the available devices line.
2025-04-15 10:36:08 +02:00
Martin Pulec
b278ecefbf aplay/jack: print the help even if no ports found
Even if no devices were found, print the help and empty list of
devices. Without that, it would be missleading because the help shows
nothing.

Print the empty list ("Available deviviecs:" with nothing) also for
acap/jack to make clear that there are actually no devices.

improves 8597f39b
2025-04-15 10:27:20 +02:00
Martin Pulec
dc102f7b27 aplay/jack: print help early
to avoid a leak as pointed by CID 472111
2025-04-15 10:08:18 +02:00
Martin Pulec
3daae72f92 vcap/screen_x11: fixed a leak
CID 472109
2025-04-15 10:00:53 +02:00
Martin Pulec
3d3151e184 vcap/screen_x11: IWYU 2025-04-15 09:59:00 +02:00
Martin Pulec
3edee950bf create-appimage.sh: silence tput err msgs
tput is just a pretty-printer, suppress the errs like `tput: unknown
terminal "unknown"` in CI (not relevant at all, just to make it clear)
2025-04-15 09:40:22 +02:00
Martin Pulec
13a0c48126 Linux ARM CI: install imagemagick
Now (since 2025-04-04, 05187ea56) it is required to bundle magickwand
dependencies.
2025-04-15 09:28:02 +02:00
Martin Pulec
98caf82455 Linux ARM CI: preserve env with sudo also for build
see the previous commit

This changes the manual handling introduced by the commit 925db63e. Also
$FEATURES are not passed explicitly as added in the commit 9eb29225.
2025-04-15 08:27:10 +02:00
Martin Pulec
30bc396d13 Linux ARM CI: pass env vars to chroot
fixes XIMEA_DOWNLOAD_URL not passed
2025-04-15 08:24:14 +02:00
Martin Pulec
ba38f4b86e rtp/video_decoders: fixed a leak
Fix leaked frame when decode failed - this is a dumb regression introduced
with the commit b52bf7b9 (2024-09-23) by inverting the condition.

also CID 152946
2025-04-14 15:44:12 +02:00
Martin Pulec
11e7c616f4 vdec/lavc: print frame flags in debug
Frame type (I/P/B) is already printed in debug so add also frame flags
which may be useful (eg. for the recent x265 intra-refresh decode
fix  6d2ab24b - flag indicates corrupted frame all the time, which
may or may not be an incorrect behavior from hevc decoder; but doesn't
matter for us, anyways).

Also use MSG(), which also has a advantage that if log_level not met,
it is not evaluated.
2025-04-14 15:44:12 +02:00
Martin Pulec
e3c5f3f92d fix CID 472161
remaining 2 occurences
2025-04-14 15:44:12 +02:00
Martin Pulec
69159df679 fix CID 402977
another occurence than already fixed with 387291a7d
2025-04-14 15:44:12 +02:00
Martin Pulec
d22c2c62fa vo_pp/text: fix CID 480256
a bit formal - the leak occurs when user repeats either t= or f=
2025-04-14 15:44:11 +02:00
Martin Pulec
952a993c7a main: removed execinfo.h include
originally needed for backtrace() stuff that has moved entirely to host.cpp
2025-04-14 15:44:11 +02:00
Martin Pulec
6a6070c862 v4l2: use strerror_s instead of GNU variant
there is also incompatible XSI variant of strerror_r
2025-04-14 15:44:11 +02:00
Martin Pulec
d6a9c13dd1 configure v4l2: check needed header
linux/videodev2.h is part of kernel headers and is usually present

But if it isn't, do not compile the stuff - there are defined the macros
that are required to compile.
2025-04-14 15:44:11 +02:00
Martin Pulec
c3749bf63d signal names: handle Linux without glibc
(in general applies to any system exept of Win and macOS)
2025-04-14 15:44:11 +02:00
Martin Pulec
46ecc5ebda avoid use of strdupa 2025-04-14 15:44:10 +02:00
Martin Pulec
d2fab937f7 host/mtrace: use only if using glibc 2025-04-14 15:44:10 +02:00
Martin Pulec
222499a246 host/backtrace: do not use when glibc not used
compat eg. with musl
2025-04-14 15:44:10 +02:00
Martin Pulec
c5628a5a38 main: fix CID 480348
introduced by 0ccf0f24 (2025-04-10)
2025-04-14 15:44:10 +02:00
Martin Pulec
b14624c568 vdec/lavc: fix CID 480349
wrong condition by the recent commit 5affa4d7 (2025-04-10)
2025-04-14 15:44:10 +02:00
Martin Pulec
4ca8b23d07 vo_pp/text: fix CID 480350 2025-04-14 15:44:08 +02:00
Martin Pulec
b7b1d5bf23 vcap/ximea: fix CID 472112
a leak if sym not found
2025-04-11 15:35:05 +02:00
Martin Pulec
c488aa8bcc vcap/ndi: fix CID 472161
a leak on wrong option given by user
2025-04-11 15:19:20 +02:00
Martin Pulec
03d1b215df video_export: fix CID 472184 2025-04-11 14:55:05 +02:00
Martin Pulec
291e8fbf67 aplay/jack: fix CID 472186
a leak on error - call rather the _done function than custom clean-up
2025-04-11 14:50:17 +02:00
Martin Pulec
8b4bad096e rtp: fix CID 472187
fix a leak when udp_init fails
2025-04-11 14:45:55 +02:00
Martin Pulec
2574f5a66a vdisp/sdl2: fix CID 474380 2025-04-11 14:35:03 +02:00
Martin Pulec
55f2f98325 rtpdec/decode_hevc_nal_unit: fix CID 47962{0,1}
The aggregate packets with less than 2 aggregation units are prohibited
by the RFC 6184/7798 and since we must receive the whole UDP packets,
this should not happen (unless UDPlite would be used). But we could
perhaps expect broken encoder (this is std transmission).
2025-04-11 14:30:29 +02:00
Martin Pulec
5affa4d730 vdec/lavc: accept corrupted for all except MJPEG
Retestd with MJPEG, VP9, AV1 and HEVC and except the first one all
(AV1 is indecisive) seem to produce better results. Tested with:
```
tc qdisc replace dev lo root netem loss 0.1%
uv -t testcard:patt=text:s=1280x720 -c lavc:c=CODEC -d gl
```
and with `--param lavd-accept-corrupted[=no]`

Namely HEVC seem to produce significantly better results (often avoiding
the intra refresh wave).

This may be revided later (HW decoders, disabled intra refresh with
H.265 and so).
2025-04-11 12:01:23 +02:00
Martin Pulec
13c2e6ac6c vdec/lavc: accept corrupted to separate fn
+ print the value in VERBOSE (for all video decoders)
2025-04-11 12:01:15 +02:00
Martin Pulec
6d2ab24bcd vdec/lavc: fix H.265 decode with intra-refresh
Fix decoding of HEVC streams with intra-refresh and current Git FFmpeg
code. When intra-refresh is enabled and we are not catching the first
frame, no frame will be decoded without the flag
AV_CODEC_FLAG_OUTPUT_CORRUPT. This corresponds with FFmpeg commit
bc1a3bfd (2025-02-20), not yet included in current 7.1.1 / lavc 61,
should appear in lavc 62.

Steps to reproduce:
```
uv -t testcard -c lavc:e=libx265 -d gl
```
2025-04-11 11:04:35 +02:00
Martin Pulec
0ccf0f2461 main/parse_cuda_device: validate
Validate the number, eg. `--cuda-device list` (instead of "help") now
triggers error.
2025-04-10 16:16:54 +02:00
Martin Pulec
403a751c5c audio/types: IWYU 2025-04-10 16:16:54 +02:00
Martin Pulec
fc257ff83d vo_pp/text: fix CID 480256 2025-04-10 16:16:54 +02:00
Martin Pulec
eea61b2604 audio_frame2::change_ch_count: fix CID 480257
the behavior is now very slightly modified but effectively the same,
eg. change 1 to 3 channels copies now channel 0 to 1 and then 1 to 2
(before it copies 0 to both 1 and 2).
2025-04-10 16:16:53 +02:00
Martin Pulec
94665c52fb vdec/lavc: thread option to keep default val 2025-04-10 16:16:53 +02:00
Martin Pulec
e8e44012be vdec/lavc: for wrong param write error not warn
For incorrect param lavd-thread-count write an error and if fatal error
handling is enabled, also exit.
2025-04-10 16:16:53 +02:00
Martin Pulec
8068038cc3 vdec/lavc: allow omission of thr count
eg. `--param lavd-thread-count=FS' to allow thread paralellism (`0FS`
neede be before)
2025-04-10 16:16:53 +02:00