Fix FLAC extension native part compilation issues

Issue: #2352

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146469547
This commit is contained in:
eguven 2017-02-03 06:45:17 -08:00 committed by Oliver Woodman
parent f2d3af7dea
commit ebc5e327e6
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := $(FLAC_SOURCES) LOCAL_SRC_FILES := $(FLAC_SOURCES)
LOCAL_CFLAGS += '-DVERSION="1.3.1"' -DFLAC__NO_MD5 -DFLAC__INTEGER_ONLY_LIBRARY -DFLAC__NO_ASM LOCAL_CFLAGS += '-DVERSION="1.3.1"' -DFLAC__NO_MD5 -DFLAC__INTEGER_ONLY_LIBRARY -DFLAC__NO_ASM
LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_COMMON_IMPLEMENTATION -fPIC LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_COMMON_IMPLEMENTATION -fPIC -DHAVE_SYS_PARAM_H
LOCAL_CFLAGS += -O3 -funroll-loops -finline-functions LOCAL_CFLAGS += -O3 -funroll-loops -finline-functions
LOCAL_LDLIBS := -llog -lz -lm LOCAL_LDLIBS := -llog -lz -lm

View File

@ -453,7 +453,8 @@ int64_t FLACParser::getSeekPosition(int64_t timeUs) {
} }
FLAC__StreamMetadata_SeekPoint* points = mSeekTable->points; FLAC__StreamMetadata_SeekPoint* points = mSeekTable->points;
for (unsigned i = mSeekTable->num_points - 1; i >= 0; i--) { for (unsigned i = mSeekTable->num_points; i > 0; ) {
i--;
if (points[i].sample_number <= sample) { if (points[i].sample_number <= sample) {
return firstFrameOffset + points[i].stream_offset; return firstFrameOffset + points[i].stream_offset;
} }