Skip to content

sf_format_check() reports wrong endian capabilities for Ogg Vorbis #1

Closed
@cvanwinkle

Description

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)
[EDIT: Try to change c comments above to c++ comments to see if that makes the GitHub Markdown happier]

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions