comparison src/flacng/tools.c @ 1041:7d7f77129c75 trunk

[svn] - Do not complain about errors in the stream while testing a file
author ertzing
date Wed, 16 May 2007 13:00:14 -0700
parents 1b0890d5c00b
children b1128efde471
comparison
equal deleted inserted replaced
1040:1b0890d5c00b 1041:7d7f77129c75
92 info->stream.has_seektable = FALSE; 92 info->stream.has_seektable = FALSE;
93 info->buffer_free = BUFFER_SIZE_SAMP; 93 info->buffer_free = BUFFER_SIZE_SAMP;
94 info->buffer_used = 0; 94 info->buffer_used = 0;
95 info->write_pointer = info->output_buffer; 95 info->write_pointer = info->output_buffer;
96 info->read_max = -1; 96 info->read_max = -1;
97 info->testing = FALSE;
97 98
98 /* 99 /*
99 * Clear the stream and frame information 100 * Clear the stream and frame information
100 */ 101 */
101 info->stream.bits_per_sample = 0; 102 info->stream.bits_per_sample = 0;
274 /* 275 /*
275 * Just scan the first 8k for the start of metadata 276 * Just scan the first 8k for the start of metadata
276 */ 277 */
277 278
278 info->read_max = 8192; 279 info->read_max = 8192;
280
281 /*
282 * We are not sure if this is an actual flac file, so do not
283 * complain too much about errors in the stream
284 */
285 info->testing = TRUE;
279 286
280 /* 287 /*
281 * Open the file 288 * Open the file
282 */ 289 */
283 if (NULL == (info->input_stream = vfs_fopen(filename, "rb"))) { 290 if (NULL == (info->input_stream = vfs_fopen(filename, "rb"))) {
298 /* 305 /*
299 * Seems to be a FLAC stream. Allow further reading 306 * Seems to be a FLAC stream. Allow further reading
300 */ 307 */
301 308
302 info->read_max = -1; 309 info->read_max = -1;
310 info->testing = FALSE;
303 311
304 _LEAVE TRUE; 312 _LEAVE TRUE;
305 } 313 }
306 314
307 /* --- */ 315 /* --- */