back out previous change to stb_vorbis (truncation of last frame in corrupt file)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Ogg Vorbis audio decoder - v1.08 - public domain
|
||||
// Ogg Vorbis audio decoder - v1.09 - public domain
|
||||
// http://nothings.org/stb_vorbis/
|
||||
//
|
||||
// Original version written by Sean Barrett in 2007.
|
||||
@ -37,6 +37,7 @@
|
||||
// manxorist@github saga musix
|
||||
//
|
||||
// Partial history:
|
||||
// 1.09 - 2016/04/04 - back out 'truncation of last frame' fix from previous version
|
||||
// 1.08 - 2016/04/02 - warnings; setup memory leaks; truncation of last frame
|
||||
// 1.07 - 2015/01/16 - fixes for crashes on invalid files; warning fixes; const
|
||||
// 1.06 - 2015/08/31 - full, correct support for seeking API (Dougall Johnson)
|
||||
@ -3510,7 +3511,7 @@ static int is_whole_packet_present(stb_vorbis *f, int end_page)
|
||||
}
|
||||
// either this continues, or it ends it...
|
||||
if (end_page)
|
||||
if (s < f->segment_count) return error(f, VORBIS_invalid_stream);
|
||||
if (s < f->segment_count-1) return error(f, VORBIS_invalid_stream);
|
||||
if (s == f->segment_count)
|
||||
s = -1; // set 'crosses page' flag
|
||||
if (p > f->stream_end) return error(f, VORBIS_need_more_data);
|
||||
@ -5342,6 +5343,7 @@ int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, in
|
||||
#endif // STB_VORBIS_NO_PULLDATA_API
|
||||
|
||||
/* Version history
|
||||
1.09 - 2016/04/04 - back out 'avoid discarding last frame' fix from previous version
|
||||
1.08 - 2016/04/02 - fixed multiple warnings; fix setup memory leaks;
|
||||
avoid discarding last frame of audio data
|
||||
1.07 - 2015/01/16 - fixed some warnings, fix mingw, const-correct API
|
||||
|
Reference in New Issue
Block a user