Commit Graph

10261 Commits

Author SHA1 Message Date
Martin Pulec
34668eb6ee acap/jack: fix CID 480385
an overflow
2025-04-16 12:47:22 +02:00
Martin Pulec
afe2c2df3e keyboard_control GETCH better err handling
GETCH - return always -1 on error, not -1 when read returned 0 and -2
if -1 - the actual value doesn't seem to be checked by any of caller.

CID 472180 should be perhaps fixed
2025-04-16 12:47:22 +02:00
Martin Pulec
2e555c7949 capture_filter: _destroy instead of free on err
CID 472158
2025-04-16 12:47:22 +02:00
Martin Pulec
d7f9924e08 vcap/aggregate fixes
- fixed a leak of s->devices (CID 472157)
- fix partial display_done (when eg. second device from 2 fail to init,
do not call the vidcap_done on this - assumes non-NULL)
- remove s!=NULL after assertion on that
2025-04-16 12:47:21 +02:00
Martin Pulec
c929520785 audio_decoders: fix CID 472154 2025-04-16 12:47:21 +02:00
Martin Pulec
c10909dd66 vcap/ximea: fix CID 472150 2025-04-16 12:47:21 +02:00
Martin Pulec
4b1c5f92a5 vcap/ndi: CID 472149
fixed improbable leak when user enters extra_ips= twice
2025-04-16 12:47:21 +02:00
Martin Pulec
8ed6c4eb9d rtp_init_if: fix a leak when init fails
CID 472144
2025-04-16 12:47:21 +02:00
Martin Pulec
5562f13dc6 video_compress: move frame instead of cpy
optimization, CID 472142; actually doesn't matter much
2025-04-16 12:47:20 +02:00
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