shithub: sox

Download patch

ref: 543588d355ac930d249694efb6bdabaa789f4b50
parent: ff89831f6f212180a15d1dfca0e95c8a31e91b8a
author: robs <robs>
date: Sun Jun 10 14:34:35 EDT 2007

Fix a crash

--- a/src/flac.c
+++ b/src/flac.c
@@ -513,7 +513,9 @@
 {
   Decoder * decoder = (Decoder *) ft->priv;
 
-  return ft->mode == 'r' && FLAC__stream_decoder_seek_absolute(decoder->flac, (FLAC__uint64)(offset / ft->signal.channels)) ?  SOX_SUCCESS : SOX_EOF;
+  int result = ft->mode == 'r' && FLAC__stream_decoder_seek_absolute(decoder->flac, (FLAC__uint64)(offset / ft->signal.channels)) ?  SOX_SUCCESS : SOX_EOF;
+  decoder->wide_sample_number = decoder->number_of_wide_samples = 0;
+  return result;
 }