mirror of
https://github.com/nothings/stb
synced 2024-12-14 03:57:26 +03:00
back out previous change to stb_vorbis (truncation of last frame in corrupt file)
This commit is contained in:
parent
5aef2b50aa
commit
4c519106a7
@ -7,8 +7,8 @@ single-file public domain libraries for C/C++ <a name="stb_libs"></a>
|
||||
|
||||
library | lastest version | category | LoC | description
|
||||
--------------------- | ---- | -------- | --- | --------------------------------
|
||||
**stb_vorbis.c** | 1.08 | audio | 5395 | decode ogg vorbis files from file/memory to float/16-bit signed output
|
||||
**stb_image.h** | 2.11 | graphics | 6753 | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC
|
||||
**stb_vorbis.c** | 1.09 | audio | 5397 | decode ogg vorbis files from file/memory to float/16-bit signed output
|
||||
**stb_image.h** | 2.12 | graphics | 6755 | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC
|
||||
**stb_truetype.h** | 1.11 | graphics | 3267 | parse, decode, and rasterize characters from truetype fonts
|
||||
**stb_image_write.h** | 1.02 | graphics | 1048 | image writing to disk: PNG, TGA, BMP
|
||||
**stb_image_resize.h** | 0.91 | graphics | 2578 | resize images larger/smaller with good quality
|
||||
@ -27,7 +27,7 @@ library | lastest version | category | LoC | description
|
||||
**stb_leakcheck.h** | 0.2 | misc | 124 | quick-and-dirty malloc/free leak-checking
|
||||
|
||||
Total libraries: 18
|
||||
Total lines of C code: 46810
|
||||
Total lines of C code: 46814
|
||||
|
||||
|
||||
FAQ
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user