diff options
author | Robert Shih <robertshih@google.com> | 2015-01-05 17:35:54 -0800 |
---|---|---|
committer | Zach Riggle <riggle@google.com> | 2015-02-25 17:31:57 +0000 |
commit | fe03f73d86bb415f5d5145f0de091834d89ae3a9 (patch) | |
tree | fa607172a51170011043a907c3a475da4c60c24a /libFLAC/stream_encoder_framing.c | |
parent | e4ad9757d5c98dea026da1697466293ac96268be (diff) | |
download | android_external_flac-fe03f73d86bb415f5d5145f0de091834d89ae3a9.tar.gz android_external_flac-fe03f73d86bb415f5d5145f0de091834d89ae3a9.tar.bz2 android_external_flac-fe03f73d86bb415f5d5145f0de091834d89ae3a9.zip |
libFLAC: merge master from Xiph
remote: https://git.xiph.org/flac.git
commit: 775eb93
Bug: 18872897
Bug: 18910747
Change-Id: I6e450e44c96b97c3323e428b9e6d420422f24a4e
(cherry picked from commit 31e4f3166a91a2ebb34f643787122a638d9f1471)
Diffstat (limited to 'libFLAC/stream_encoder_framing.c')
-rw-r--r-- | libFLAC/stream_encoder_framing.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libFLAC/stream_encoder_framing.c b/libFLAC/stream_encoder_framing.c index 939955b..959eca0 100644 --- a/libFLAC/stream_encoder_framing.c +++ b/libFLAC/stream_encoder_framing.c @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2014 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,7 +30,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include <config.h> #endif @@ -39,11 +40,6 @@ #include "private/crc.h" #include "FLAC/assert.h" -#ifdef max -#undef max -#endif -#define max(x,y) ((x)>(y)?(x):(y)) - static FLAC__bool add_entropy_coding_method_(FLAC__BitWriter *bw, const FLAC__EntropyCodingMethod *method); static FLAC__bool add_residual_partitioned_rice_(FLAC__BitWriter *bw, const FLAC__int32 residual[], const unsigned residual_samples, const unsigned predictor_order, const unsigned rice_parameters[], const unsigned raw_bits[], const unsigned partition_order, const FLAC__bool is_extended); @@ -166,11 +162,11 @@ FLAC__bool FLAC__add_metadata_block(const FLAC__StreamMetadata *metadata, FLAC__ if(!FLAC__bitwriter_write_raw_uint32(bw, track->num_indices, FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN)) return false; for(j = 0; j < track->num_indices; j++) { - const FLAC__StreamMetadata_CueSheet_Index *index = track->indices + j; + const FLAC__StreamMetadata_CueSheet_Index *indx = track->indices + j; - if(!FLAC__bitwriter_write_raw_uint64(bw, index->offset, FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN)) + if(!FLAC__bitwriter_write_raw_uint64(bw, indx->offset, FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN)) return false; - if(!FLAC__bitwriter_write_raw_uint32(bw, index->number, FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN)) + if(!FLAC__bitwriter_write_raw_uint32(bw, indx->number, FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN)) return false; if(!FLAC__bitwriter_write_zeroes(bw, FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN)) return false; |