diff -up MPlayer-1.2/libmpcodecs/ad_spdif.c.pts MPlayer-1.2/libmpcodecs/ad_spdif.c --- MPlayer-1.2/libmpcodecs/ad_spdif.c.pts 2015-06-10 14:24:28.000000000 +0200 +++ MPlayer-1.2/libmpcodecs/ad_spdif.c 2015-12-31 21:18:38.635968903 +0100 @@ -211,6 +211,11 @@ static int init(sh_audio_t *sh) default: break; } + + // a call to avformat_write_header() is needed to prevent segfaults, + // but this should replace the earlier call to lavf_ctx->oformat->write_header() + // somehow... + avformat_write_header(lavf_ctx, NULL); return 1;