Changeset 153
- Timestamp:
- 12/07/06 20:35:14 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpcdec/trunk/src/streaminfo.c
r37 r153 216 216 si->total_file_length = r->get_size(r->data); 217 217 si->tag_offset = si->total_file_length; 218 if (memcmp(HeaderData, "MP+", 3) == 0) { 218 219 if (memcmp(HeaderData, "MP+", 3)) return ERROR_CODE_INVALIDSV; 219 220 #ifndef MPC_LITTLE_ENDIAN 221 { 220 222 mpc_uint32_t ptr; 221 223 for (ptr = 0; ptr < 8; ptr++) { 222 224 HeaderData[ptr] = mpc_swap32(HeaderData[ptr]); 223 225 } 226 } 224 227 #endif 225 si->stream_version = HeaderData[0] >> 24;226 227 // stream version 8 228 if ((si->stream_version & 15) >= 8) {229 return ERROR_CODE_INVALIDSV;230 }231 // stream version 7232 else if ((si->stream_version & 15) == 7) {233 Error = streaminfo_read_header_sv7(si, HeaderData);234 if (Error != ERROR_CODE_OK) return Error;235 }236 } else {228 229 si->stream_version = HeaderData[0] >> 24; 230 231 // stream version 8 232 if ((si->stream_version & 15) >= 8) { 233 return ERROR_CODE_INVALIDSV; 234 } 235 // stream version 7 236 else if ((si->stream_version & 15) == 7) { 237 Error = streaminfo_read_header_sv7(si, HeaderData); 238 if (Error != ERROR_CODE_OK) return Error; 239 } 237 240 #ifdef MPC_SUPPORT_SV456 241 else { 238 242 // stream version 4-6 239 243 Error = streaminfo_read_header_sv6(si, HeaderData); 240 #else 241 return ERROR_CODE_INVALIDSV;244 if (Error != ERROR_CODE_OK) return Error; 245 } 242 246 #endif 243 }244 247 245 248 // estimation, exact value needs too much time
Note: See TracChangeset
for help on using the changeset viewer.