Changeset 138 for libmpc/branches/r2d/libmpcdec/mpc_demux.c
- Timestamp:
- 11/15/06 13:29:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/mpc_demux.c
r126 r138 43 43 44 44 // streaminfo.c 45 mpc_status streaminfo_read_header_sv8(mpc_streaminfo* si, const mpc_bits_reader * r_in); 45 mpc_status streaminfo_read_header_sv8(mpc_streaminfo* si, 46 const mpc_bits_reader * r_in, 47 mpc_size_t block_size); 46 48 mpc_status streaminfo_read_header_sv7(mpc_streaminfo* si, mpc_bits_reader * r_in); 47 49 void streaminfo_encoder_info(mpc_streaminfo* si, const mpc_bits_reader * r_in); … … 134 136 while( memcmp(b.key, "AD", 2) != 0 ){ // scan all blocks until audio 135 137 mpc_demux_fill(d, 11 + b.size, 0); 136 if (memcmp(b.key, "SI", 2) == 0) 137 streaminfo_read_header_sv8(&d->si, &d->bits_reader); 138 else if (memcmp(b.key, "EI", 2) == 0) 138 if (memcmp(b.key, "SI", 2) == 0){ 139 int ret = streaminfo_read_header_sv8(&d->si, &d->bits_reader, b.size); 140 if (ret != MPC_STATUS_OK) 141 return ret; 142 } else if (memcmp(b.key, "EI", 2) == 0) 139 143 streaminfo_encoder_info(&d->si, &d->bits_reader); 140 144 else if (memcmp(b.key, "RG", 2) == 0) … … 161 165 p_tmp->block_bits = 0; 162 166 // lire entête 163 mpc_demux_header(p_tmp); 164 // initialisation decodeur 165 p_tmp->d = mpc_decoder_init(&p_tmp->si); 167 if (mpc_demux_header(p_tmp) == MPC_STATUS_OK) { 168 // initialisation decodeur 169 p_tmp->d = mpc_decoder_init(&p_tmp->si); 170 } else { 171 free(p_tmp); 172 p_tmp = 0; 173 } 166 174 } 167 175
Note: See TracChangeset
for help on using the changeset viewer.