+
+ # Work around issues on devices having ffmpeg libraries
+ # in a system vendor dir, reported by live_the_dream on #termux:
+ local FFMPEG_LIBS="" lib
+ for lib in avcodec avfilter avformat avutil postproc swresample swscale; do
+ if [ -n "$FFMPEG_LIBS" ]; then FFMPEG_LIBS+=":"; fi
+ FFMPEG_LIBS+="$TERMUX_PREFIX/lib/lib${lib}.so"
+ done
+ echo "export LD_PRELOAD=$FFMPEG_LIBS" >> $TERMUX_PREFIX/bin/mpv
+