Commit f3b8096b authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '0c03cc68'

* commit '0c03cc68':
  mp3: exit on parsing error in mp_decode_frame
  rtmppkt: Avoid unescaped backslash in Doxygen comment
  fate-lavfi: replace sed/grep/cut combos with awk
  build: Plan 9 support

Merged-by: 's avatarMichael Niedermayer <>
parents 42ee9f39 0c03cc68
case "$1" in
-n) n=$2; shift 2 ;;
-n*) n=${1#-n}; shift ;;
exec sed ${n}q "$@"
* This file is part of FFmpeg.
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
int plan9_main(int argc, char **argv);
#undef main
int main(int argc, char **argv)
/* The setfcr() function in lib9 is broken, must use asm. */
#ifdef __i386
short fcr;
__asm__ volatile ("fstcw %0 \n"
"or $63, %0 \n"
"fldcw %0 \n"
: "=m"(fcr));
return plan9_main(argc, argv);
exec awk "BEGIN { for (i = 2; i < ARGC; i++) printf \"$1\", ARGV[i] }" "$@"
......@@ -1071,7 +1071,7 @@ apply(){
cmp -s "$1" "$2" && echo "$2 is unchanged" && return
mkdir -p "$(dirname $2)"
cp -f "$1" "$2"
$cp_f "$1" "$2"
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
......@@ -2010,6 +2010,7 @@ ar_default="ar"
cp_f="cp -f"
ln_s="ln -sf"
nm_default="nm -g"
......@@ -3202,6 +3203,19 @@ case $target_os in
add_cppflags -D_C99_SNPRINTF_EXTENSION \
add_compat strtod.o strtod=avpriv_strtod
disable ffserver
ln_s='ln -s -f'
......@@ -3955,6 +3969,12 @@ elif enabled msvc; then
enabled x86_32 && disable aligned_stack
case $target_os in
add_cppflags -Dmain=plan9_main
enabled_any $THREADS_LIST && enable threads
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
......@@ -304,4 +304,67 @@ and for a build with shared libraries
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
@end example
@chapter Plan 9
The native @uref{, Plan 9} compiler
does not implement all the C99 features needed by FFmpeg so the gcc
port must be used. Furthermore, a few items missing from the C
library and shell environment need to be fixed.
@item GNU awk, grep, make, and sed
Working packages of these tools can be found at
@uref{, ports2plan9}.
They can be installed with @uref{, 9front's} @code{pkg}
utility by setting @code{pkgpath} to
@item Missing/broken @code{head} and @code{printf} commands
Replacements adequate for building FFmpeg can be found in the
@code{compat/plan9} directory. Place these somewhere they will be
found by the shell. These are not full implementations of the
commands and are @emph{not} suitable for general use.
@item Missing C99 @code{stdint.h} and @code{inttypes.h}
Replacement headers are available from
@item Missing or non-standard library functions
Some functions in the C library are missing or incomplete. The
gcc-apelibs-1207}} package from
@uref{, ports2plan9}
includes an updated C library, but installing the full package gives
unusable executables. Instead, keep the files from @code{gccbin.tgz}
under @code{/386/lib/gnu}. From the @code{libc.a} archive in the
@code{gcc-apelibs-1207} package, extract the following object files and
turn them into a library:
@item @code{strerror.o}
@item @code{strtoll.o}
@item @code{snprintf.o}
@item @code{vsnprintf.o}
@item @code{vfprintf.o}
@item @code{_IO_getc.o}
@item @code{_IO_putc.o}
@end itemize
Use the @code{--extra-libs} option of @code{configure} to inform the
build system of this library.
@item FPU exceptions enabled by default
Unlike most other systems, Plan 9 enables FPU exceptions by default.
These must be disabled before calling any FFmpeg functions. While the
included tools will do this automatically, other users of the
libraries must do it themselves.
@end itemize
......@@ -67,7 +67,7 @@ static inline int is_dos_path(const char *path)
return 0;
#if defined(__OS2__)
#if defined(__OS2__) || defined(__Plan9__)
#define SHUT_RD 0
#define SHUT_WR 1
#define SHUT_RDWR 2
......@@ -253,7 +253,7 @@ int ff_amf_read_number(GetByteContext *gbc, double *val);
* Read AMF string value.
* Appends a trailing \0 to output string in order to
* Appends a trailing null byte to output string in order to
* ease later parsing.
*@param[in,out] gbc GetByteContext initialized with AMF-formatted data
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment