From: Mark Wooding Date: Fri, 25 Mar 2022 11:24:46 +0000 (+0000) Subject: bin/nocss: Handy script to inhibit CSS decryption by `libdvdread'. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/bc61033efdab44322d89327807116e7e3f6d348e?ds=sidebyside bin/nocss: Handy script to inhibit CSS decryption by `libdvdread'. My DVD archive is already decrypted, so CSS is unnecessary; but `libdvdread' still takes some time -- sometimes a long time -- trying to `crack' the nonexistent keys, and, on rare occasions, this can actually result in a failure to read the plain content of the DVD image. --- diff --git a/Makefile b/Makefile index fa021c6..4388fe7 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,13 @@ DOTLINKS += .tclshrc .wishrc .tclshrc_SRC = tclshrc .wishrc_SRC = tclshrc +## The `nocss' machinery. +SCRIPTLINKS += nocss +all: $(HOME)/lib/hacks/nocss/libdvdcss.so.2 +$(HOME)/lib/hacks/nocss/libdvdcss.so.2: + $(V_AT)mkdir -p $(dir $@) + $(call v_tag,TOUCH)touch $@ + ## Random scripts. SCRIPTLINKS += mdw-editor mdw-pager SCRIPTLINKS += mdw-conf diff --git a/bin/nocss b/bin/nocss new file mode 100755 index 0000000..5adc23e --- /dev/null +++ b/bin/nocss @@ -0,0 +1,10 @@ +#! /bin/sh -e + +case $# in 0) set -- "$SHELL" ;; esac +DVDCSS_CACHE=none; export DVDCSS_CACHE +DVDREAD_NOKEYS=t; export DVDREAD_NOKEYS +if [ -d "$HOME/lib/hacks/nocss" ]; then + LD_LIBRARY_PATH=$HOME/lib/hacks/nocss${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + export LD_LIBRARY_PATH +fi +exec "$@"