Skip to content

Commit

Permalink
Fix FLAC extension native part compilation issues
Browse files Browse the repository at this point in the history
Issue: #2352

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146469547
  • Loading branch information
erdemguven authored and ojw28 committed Feb 15, 2017
1 parent f2d3af7 commit ebc5e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/flac/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := $(FLAC_SOURCES)

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_LDLIBS := -llog -lz -lm
Expand Down
3 changes: 2 additions & 1 deletion extensions/flac/src/main/jni/flac_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ int64_t FLACParser::getSeekPosition(int64_t timeUs) {
}

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) {
return firstFrameOffset + points[i].stream_offset;
}
Expand Down

0 comments on commit ebc5e32

Please sign in to comment.