Changeset 425
- Timestamp:
- 02/16/09 22:33:42 (16 years ago)
- Location:
- libmpc/trunk/libmpcdec
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/mpc_demux.c
r424 r425 429 429 d->si.pns = magic[3] >> 4; 430 430 if (d->si.stream_version == 7) { 431 mpc_status ret; 431 432 mpc_demux_fill(d, 6 * 4, MPC_BUFFER_SWAP); // header block size + endian convertion 432 streaminfo_read_header_sv7(&d->si, &d->bits_reader); 433 ret = streaminfo_read_header_sv7(&d->si, &d->bits_reader); 434 if (ret != MPC_STATUS_OK) return ret; 433 435 } else { 434 436 return MPC_STATUS_INVALIDSV; -
libmpc/trunk/libmpcdec/streaminfo.c
r390 r425 51 51 "'BrainDead'", "'quality 9'", "'quality 10'" 52 52 }; 53 static const mpc_int32_t samplefreqs[ 4] = { 44100, 48000, 37800, 32000 };53 static const mpc_int32_t samplefreqs[8] = { 44100, 48000, 37800, 32000 }; 54 54 55 55 static const char * … … 97 97 } 98 98 99 static mpc_status check_streaminfo(mpc_streaminfo * si) 100 { 101 if (si->max_band == 0 || si->max_band > 32 102 || si->channels > 2) 103 return MPC_STATUS_FILE; 104 return MPC_STATUS_OK; 105 } 106 99 107 /// Reads streaminfo from SV7 header. 100 108 mpc_status … … 157 165 * si->sample_freq / si->samples; 158 166 159 return MPC_STATUS_OK;167 return check_streaminfo(si); 160 168 } 161 169 … … 206 214 * si->sample_freq / (si->samples - si->beg_silence); 207 215 208 return MPC_STATUS_OK;216 return check_streaminfo(si); 209 217 } 210 218
Note: See TracChangeset
for help on using the changeset viewer.