Ver código fonte

stb_vorbis: Clarify lifetime of pushdata *output buffers

Fixes issue #929.
Fabian Giesen 4 anos atrás
pai
commit
39a0641385
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      stb_vorbis.c

+ 6 - 0
stb_vorbis.c

@@ -223,6 +223,12 @@ extern int stb_vorbis_decode_frame_pushdata(
 // channel. In other words, (*output)[0][0] contains the first sample from
 // the first channel, and (*output)[1][0] contains the first sample from
 // the second channel.
+//
+// *output points into stb_vorbis's internal output buffer storage; these
+// buffers are owned by stb_vorbis and application code should not free
+// them or modify their contents. They are transient and will be overwritten
+// once you ask for more data to get decoded, so be sure to grab any data
+// you need before then.
 
 extern void stb_vorbis_flush_pushdata(stb_vorbis *f);
 // inform stb_vorbis that your next datablock will not be contiguous with