NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

shairport-sync 4.3.4 crashes upon streaming #360768

Open lloeki opened 1 day ago

lloeki commented 1 day ago

Describe the bug

Segfault when attempting to stream.

Steps To Reproduce

Steps to reproduce the behavior:

  1. enable shairport-sync service
  2. stream to it
  3. observe crash

Expected behavior

no crash

Screenshots

Dec 01 11:46:42 pi1 shairport-sync[788]: [SWR @ 0x7f6801dce0] Input channel layout "" is invalid or unsupported.
Dec 01 11:46:42 pi1 shairport-sync[788]: [SWR @ 0x7f6801dce0] Context has not been initialized
Dec 01 11:46:42 pi1 shairport-sync[788]: *** buffer overflow detected ***: terminated

Additional context

This uses a version that works:

  nixpkgs.overlays = let
    shairport-sync-overlay-git = (final: prev: {
      shairport-sync = prev.shairport-sync.overrideAttrs (_: {
        version = "git";
        src = pkgs.fetchFromGitHub {
          repo = "shairport-sync";
          owner = "mikebrady";
          rev = "d8442c1afcd5f2871f024423495ddf205555f2d5";
          sha256 = "sha256-r4P1wToRsLPcMC+0UQ3yp4gDU89DpvEZWPLBiJsVDUg=";
        };
      });
    });

   shairport-sync-overlay-airplay2 = (final: prev: {
     shairport-sync = prev.shairport-sync.override { enableAirplay2 = true; };
   });
  in
    [ shairport-sync-overlay-git shairport-sync-overlay-airplay2 ]

Metadata

Notify maintainers

@LnL7 @jordanisaacs


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

jwillikers commented 17 hours ago

I would guess that this is related to ffmpeg 7, which requires changes that were made upstream but haven't been released yet. See https://github.com/mikebrady/shairport-sync/issues/1876 for reference. Oh wait, it seems you already have gotten that far in your upstream issue.

I should be able to look into backporting the necessary changes as a patch tomorrow for the package, unless someone gets to that first.

In the meantime, I've been using a newer commit to fix this. The overlay is here in case it helps.