erikd/libsndfile — Issue #1: sf_format_check() reports wrong endian capabilities for Ogg Vorbis
Author: cvanwinkle
Created: 2012-01-20 17:11:22+00:00
State: open

If you have an SF_INFO struct like the following:

SF_INFO myInfo;
myInfo.frames = 0xcccccccccccccccc	/* uninitialized */
myInfo.samplerate = 0
myInfo.channels = 1
myInfo.format = 0x00200060	/* Ogg Vorbis */
myInfo.sections = 0xcccccccc	/* uninitialized */
myInfo.seekable = 0xcccccccc	/* uninitialized */

And you use sf_format_check(&myInfo) to check the validity of the format, it always returns SF_TRUE even when you also set either of the following

a) myInfo.format = myInfo.format | SF_ENDIAN_LITTLE;
b) myInfo.format = myInfo.format | SF_ENDIAN_BIG;

The problem is if you use sf_open() in write mode (0x00000020) with either the above SF_ENDIAN_LITTLE or SF_ENDIAN_BIG, that call will return NULL;

After that, sf_error() will indicate error code 29 ("Unspecified internal error.")

The request is to fix the sf_format_check() routine to properly report the capabilities of the Ogg Vorbis format combination.

(Adobe Bug #3093345)