Fix compile warnings for target=armv7-android-gcc

Fix compile warnings about implicit type conversion for
target=armv7-android-gcc in aomenc.c.

cherry-picked from libvpx:
380a26112 Fix compile warnings for target=armv7-android-gcc

BUG=aomedia:111

Change-Id: Iffa6af8ac5d87582f418e3425bee0e1d48f27b93
This commit is contained in:
James Zern 2017-01-14 14:18:01 -08:00
Родитель a417d60252
Коммит b643036483
3 изменённых файлов: 16 добавлений и 11 удалений

Просмотреть файл

@ -1674,7 +1674,7 @@ static void get_cx_data(struct stream_state *stream,
*got_data = 0;
while ((pkt = aom_codec_get_cx_data(&stream->encoder, &iter))) {
static size_t fsize = 0;
static int64_t ivf_header_pos = 0;
static FileOffset ivf_header_pos = 0;
switch (pkt->kind) {
case AOM_CODEC_CX_FRAME_PKT:
@ -1700,7 +1700,7 @@ static void get_cx_data(struct stream_state *stream,
fsize += pkt->data.frame.sz;
if (!(pkt->data.frame.flags & AOM_FRAME_IS_FRAGMENT)) {
const int64_t currpos = ftello(stream->file);
const FileOffset currpos = ftello(stream->file);
fseeko(stream->file, ivf_header_pos, SEEK_SET);
ivf_write_frame_size(stream->file, fsize);
fseeko(stream->file, currpos, SEEK_SET);

Просмотреть файл

@ -1433,7 +1433,7 @@ EOF
esac
# glibc needs these
if enabled linux; then
if enabled linux || [ "$toolchain" = "generic-gnu" ]; then
add_cflags -D_LARGEFILE_SOURCE
add_cflags -D_FILE_OFFSET_BITS=64
fi

Просмотреть файл

@ -27,11 +27,23 @@
/* MSVS uses _f{seek,tell}i64. */
#define fseeko _fseeki64
#define ftello _ftelli64
typedef int64_t FileOffset;
#elif defined(_WIN32)
#include <sys/types.h> /* NOLINT*/
/* MinGW uses f{seek,tell}o64 for large files. */
#define fseeko fseeko64
#define ftello ftello64
#endif /* _WIN32 */
typedef off64_t FileOffset;
#elif CONFIG_OS_SUPPORT
#include <sys/types.h> /* NOLINT*/
typedef off_t FileOffset;
/* Use 32-bit file operations in WebM file format when building ARM
* executables (.axf) with RVCT. */
#else
#define fseeko fseek
#define ftello ftell
typedef long FileOffset /* NOLINT */
#endif /* CONFIG_OS_SUPPORT */
#if CONFIG_OS_SUPPORT
#if defined(_MSC_VER)
@ -43,13 +55,6 @@
#endif /* _MSC_VER */
#endif /* CONFIG_OS_SUPPORT */
/* Use 32-bit file operations in WebM file format when building ARM
* executables (.axf) with RVCT. */
#if !CONFIG_OS_SUPPORT
#define fseeko fseek
#define ftello ftell
#endif /* CONFIG_OS_SUPPORT */
#define LITERALU64(hi, lo) ((((uint64_t)hi) << 32) | lo)
#ifndef PATH_MAX