Changeset 473 for libmpc/trunk/libmpcdec/streaminfo.c
- Timestamp:
- 07/28/11 21:51:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/streaminfo.c
r443 r473 100 100 { 101 101 if (si->max_band == 0 || si->max_band >= 32 102 || si->channels > 2 )103 return MPC_STATUS_F ILE;102 || si->channels > 2 || si->channels == 0 || si->sample_freq == 0) 103 return MPC_STATUS_FAIL; 104 104 return MPC_STATUS_OK; 105 105 } … … 156 156 157 157 if (last_frame_samples == 0) last_frame_samples = MPC_FRAME_LENGTH; 158 else if (last_frame_samples > MPC_FRAME_LENGTH) return MPC_STATUS_FAIL; 158 159 si->samples = (mpc_int64_t) frames * MPC_FRAME_LENGTH; 159 160 if (si->is_true_gapless) … … 192 193 CRC = (mpc_bits_read(&r, 16) << 16) | mpc_bits_read(&r, 16); 193 194 if (CRC != mpc_crc32(r.buff + 1 - (r.count >> 3), (int)block_size - 4)) 194 return MPC_STATUS_F ILE;195 return MPC_STATUS_FAIL; 195 196 196 197 si->stream_version = mpc_bits_read(&r, 8); 197 198 if (si->stream_version != 8) 198 return MPC_STATUS_ INVALIDSV;199 return MPC_STATUS_FAIL; 199 200 200 201 mpc_bits_get_size(&r, &si->samples);
Note: See TracChangeset
for help on using the changeset viewer.