Mike Brady [Tue, 16 Jul 2024 11:25:15 +0000 (12:25 +0100)]
Use (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO now in place of bit-mapped AV_CH_LAYOUT_STEREO -- possible from FFmpeg 5.1, mandatory in FFmpeg 7. Also remove deprecated avcodec_close.
Mike Brady [Sun, 30 Jun 2024 08:56:29 +0000 (09:56 +0100)]
Fix a bug that blocked a fatal error exit if the player thread couldn't be terminated. Revert the session timeout from one minute back to two minutes (120 seconds).
Mike Brady [Sat, 29 Jun 2024 19:06:27 +0000 (20:06 +0100)]
Remove watchdog stuff. Move the pthreadtestcancel into the loop inside buffergetframe() -- somethime the player can stay inside that loop indefinitely.
Mike Brady [Sat, 29 Jun 2024 19:04:29 +0000 (20:04 +0100)]
Remove watchdog stuff. USe the session timeout to set the TCP keep intervals and stuff. Change response to ETIMEDOUT to rtsp_read_request_response_immediate_shutdown_requested.
Mike Brady [Sat, 15 Jun 2024 13:31:14 +0000 (14:31 +0100)]
Change order of some include file to facilitiate old Mac OS X builds. Check existence of TCP_KEEPINTVL before trying to use it. Fix a race condition with initial messages to the metadata queues. The race was that the queues and mutexes were definied in a thread, so could be delayed to after when the main process was using them.
Mike Brady [Thu, 23 May 2024 13:24:30 +0000 (14:24 +0100)]
Reverse changes made in PR 1831 (https://github.com/mikebrady/shairport-sync/pull/1831/files) -- issue identified in Issue 1856 (https://github.com/mikebrady/shairport-sync/issues/1856).
Mike Brady [Mon, 1 Apr 2024 12:02:20 +0000 (13:02 +0100)]
Merge pull request #1831 from kuzhylol/master
This patch introduces modification to AirPlay attributes allowing AirPlay clients seeing only appropriate Endpoints of specific version of AirPlay protocol.
[Test]
Run two instances of shairport-sync - built for version 1 and for version 2.
TuneBlade recognizes only AirPlay version 1 instance running.
MacOS/iOS recognizes only AirPlay version 2 instance running.
Without that patch, both MacOS/iOS detect two endpoints at the same time. The TuneBlade detects only AirPlay version 1 since it doesn't support AirPlay version 2.
Oleh Kuzhylnyi [Sun, 24 Mar 2024 16:05:40 +0000 (13:05 -0300)]
Add version-based visibility of shairport-sync endpoints
This patch introduces modification to AirPlay attributes allowing AirPlay clients
seeing only appropriate Endpoints of specific version of AirPlay protocol.
[Test]
Run two instances of shairport-sync - built for version 1 and for version 2.
TuneBlade recognizes only AirPlay version 1 instance running.
MacOS/iOS recognizes only AirPlay version 2 instance running.
Without that patch, both MacOS/iOS detect two endpoints at the same time.
The TuneBlade detects only AirPlay version 1 since it doesn't support AirPlay version 2.
porg [Thu, 7 Mar 2024 09:31:27 +0000 (10:31 +0100)]
Update AIRPLAY2.md - Version introduced + Supported devices
The introduction paragraph now more clearly mentions the hard facts/requirements with "as of v4.1 and newer" and the supported devices are displayed in bullet list format for better readabilty.
Mike Brady [Mon, 4 Mar 2024 11:13:56 +0000 (11:13 +0000)]
Build scripts/shairport-sync.service, scripts/shairport-sync.service-avahi and scripts/shairport-sync unconditionally for Linux to facilitate different installation methods.
Klemens Nanni [Wed, 31 Jan 2024 04:01:55 +0000 (05:01 +0100)]
Fix crash on double pthread_cancel(3) on exit
On OpenBSD 7.4-current, failure to listen on the RTSP socket(s) results
the `rtsp_listener_thread` being pthread_cancel(3)'ed twice, once through
`rtsp_listen_loop()` and again via atexit(3) handler `exit_rtsp_listener()`:
```
$ nc -4l 5000 &
$ nc -6l 5000 &
$ shairport-sync -c/dev/null
warning: could not establish a service on port 5000 -- program terminating. Is another instance of Shairport Sync running on this device?
Segmentation fault (core dumped)
```
```
Program terminated with signal SIGSEGV, Segmentation fault.
433 if (tib->tib_canceled == 0 && tid != 0 &&
[Current thread is 1 (process 290061)]
```
`die()` -> `exit(EXIT_FAILURE)` normally in this case, thus forgoing the
first cancel and relying on the atexit handler alone.
Klemens Nanni [Tue, 30 Jan 2024 02:43:44 +0000 (03:43 +0100)]
Exit on config read error to avoid crash on EACCES
Failure to read does not exit despite
` /* Read the file. If there is an error, report it and exit. */`
EACCES (e.g. insufficient filesystem permissions) is enough to crash
on access through later `config_*()` such as those when either of
either of D-Bus, MPRIS or MQTT is used.
Seen `--with-mpris-interface` and
```
$ ls -l /etc/shairport-sync.conf
-rw-r----- 1 root _shairport 28114 Jan 25 01:53 /etc/shairport-sync.conf
$ shairport-sync
Segmentation fault (core dumped)
```