ffmpeg: fix path to /tmp

This commit is contained in:
Leonid Pliushch 2019-03-02 14:52:27 +02:00
parent 7e7644481a
commit 9cc7576485
2 changed files with 22 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multim
TERMUX_PKG_LICENSE="GPL-3.0"
# NOTE: mpv has to be rebuilt and version bumped after updating ffmpeg.
TERMUX_PKG_VERSION=4.1.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=373749824dfd334d84e55dff406729edfd1606575ee44dd485d97d45ea4d2d86
TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
# libbz2 is used by matroska decoder:

View File

@ -0,0 +1,21 @@
diff -uNr ffmpeg-4.1.1/libavutil/file_open.c ffmpeg-4.1.1.mod/libavutil/file_open.c
--- ffmpeg-4.1.1/libavutil/file_open.c 2019-02-09 22:56:02.000000000 +0200
+++ ffmpeg-4.1.1.mod/libavutil/file_open.c 2019-03-02 01:54:58.775236751 +0200
@@ -119,7 +119,7 @@
#undef free
free(ptr);
#else
- size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
+ size_t len = strlen(prefix) + strlen("@TERMUX_PREFIX@/tmp/") + 7; /* room for "@TERMUX_PREFIX@/tmp/" and "XXXXXX\0" */
*filename = av_malloc(len);
#endif
/* -----common section-----*/
@@ -136,7 +136,7 @@
# endif
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
#else
- snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
+ snprintf(*filename, len, "@TERMUX_PREFIX@/tmp/%sXXXXXX", prefix);
fd = mkstemp(*filename);
#if defined(_WIN32) || defined (__ANDROID__)
if (fd < 0) {