Commit b9b28381 authored by James Zern's avatar James Zern

aomdec: remove use of fileno()

this requires _POSIX_C_SOURCE >= 1 for glibc, but its only use was with
stdout; use the file number directly

BUG=aomedia:111

Change-Id: Iebfc339c894abbf77b08c7744a4f66b34948b33f
parent 0f4bcda7
...@@ -18,6 +18,14 @@ ...@@ -18,6 +18,14 @@
#include "./aom_config.h" #include "./aom_config.h"
#if CONFIG_OS_SUPPORT
#if HAVE_UNISTD_H
#include <unistd.h> // NOLINT
#elif !defined(STDOUT_FILENO)
#define STDOUT_FILENO 1
#endif
#endif
#if CONFIG_LIBYUV #if CONFIG_LIBYUV
#include "third_party/libyuv/include/libyuv/scale.h" #include "third_party/libyuv/include/libyuv/scale.h"
#endif #endif
...@@ -636,7 +644,7 @@ static int main_loop(int argc, const char **argv_) { ...@@ -636,7 +644,7 @@ static int main_loop(int argc, const char **argv_) {
} }
#if CONFIG_OS_SUPPORT #if CONFIG_OS_SUPPORT
/* Make sure we don't dump to the terminal, unless forced to with -o - */ /* Make sure we don't dump to the terminal, unless forced to with -o - */
if (!outfile_pattern && isatty(fileno(stdout)) && !do_md5 && !noblit) { if (!outfile_pattern && isatty(STDOUT_FILENO) && !do_md5 && !noblit) {
fprintf(stderr, fprintf(stderr,
"Not dumping raw video to your terminal. Use '-o -' to " "Not dumping raw video to your terminal. Use '-o -' to "
"override.\n"); "override.\n");
......
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