Advertisement
Guest User

Untitled

a guest
Jan 19th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. stream_decoder.c
  2.  
  3. else {
  4. /* Bad frame, emit error and zero the output signal */
  5. send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH);
  6. if(do_full_decode) {
  7. for(channel = 0; channel < decoder->private_->frame.header.channels; channel++)
  8. memset(decoder->private_->output[channel], 0, sizeof(FLAC__int32) * decoder->private_->frame.header.blocksize);
  9. }
  10. }
  11.  
  12. }
  13.  
  14. even after there is a CRC16 error it continues to use the block anyway!
  15. it needs to put the decoder back into a suitable mode!
  16.  
  17. else {
  18. /* Bad frame, emit error and zero the output signal */
  19. send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH);
  20. if(do_full_decode) {
  21. for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) {
  22. memset(decoder->private_->output[channel], 0, sizeof(FLAC__int32) * decoder->private_->frame.header.blocksize);
  23. }
  24. }
  25.  
  26. decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
  27. return true; // ??
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement