[xiph-commits] r18964 - in trunk/vorbis: doc/vorbisfile lib
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sat Jul 13 13:57:15 PDT 2013
Author: xiphmont
Date: 2013-07-13 13:57:14 -0700 (Sat, 13 Jul 2013)
New Revision: 18964
Modified:
trunk/vorbis/doc/vorbisfile/ov_test.html
trunk/vorbis/lib/vorbisfile.c
Log:
Patch for trac #1965; clarify in comments and docs that a failed call
to ov_test does not take ownership of the passed-in file.
Modified: trunk/vorbis/doc/vorbisfile/ov_test.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/ov_test.html 2013-07-12 15:37:33 UTC (rev 18963)
+++ trunk/vorbis/doc/vorbisfile/ov_test.html 2013-07-13 20:57:14 UTC (rev 18964)
@@ -19,9 +19,12 @@
<p>
This partially opens a vorbis file to test for Vorbis-ness. It loads
-the headers for the first chain and tests for seekability (but does not seek).
-Use <a href="ov_test_open.html">ov_test_open()</a> to finish opening the file
-or <a href="ov_clear.html">ov_clear</a> to close/free it.
+the headers for the first chain and tests for seekability (but does
+not seek). Use <a href="ov_test_open.html">ov_test_open()</a> to
+finish opening the file or <a href="ov_clear.html">ov_clear</a> to
+close/free it. Note that vorbisfile does <b>not</b> take ownership of
+the file if the call fails; the calling applicaiton is responsible for
+closing the file if this call returns an error.
<p>
<p><em><b> WARNING for Windows developers: </b> Do not use ov_test()
Modified: trunk/vorbis/lib/vorbisfile.c
===================================================================
--- trunk/vorbis/lib/vorbisfile.c 2013-07-12 15:37:33 UTC (rev 18963)
+++ trunk/vorbis/lib/vorbisfile.c 2013-07-13 20:57:14 UTC (rev 18964)
@@ -1055,8 +1055,12 @@
/* Only partially open the vorbis file; test for Vorbisness, and load
the headers for the first chain. Do not seek (although test for
seekability). Use ov_test_open to finish opening the file, else
- ov_clear to close/free it. Same return codes as open. */
+ ov_clear to close/free it. Same return codes as open.
+ Note that vorbisfile does _not_ take ownership of the file if the
+ call fails; the calling applicaiton is responsible for closing the file
+ if this call returns an error. */
+
int ov_test_callbacks(void *f,OggVorbis_File *vf,
const char *initial,long ibytes,ov_callbacks callbacks)
{
More information about the commits
mailing list