Skip to content

Possible bug with av_frame_get_buffer() when trying to get audio frame buffer #50

@Error-String-Expected-Got-Nil

Description

Using FFmpeg version 7.1, though I did test with 7.0 and it persisted there as well.

Image

The upper half of this snippet always fails with the EINVAL error return code, despite the fact that the frame has the nb_samples, ch_layout, and sample_format fields set, which should be all that is required to allocate the buffers according to the documentation.. I have looked over the libav source code and manually tried the checks that can return EINVAL, and this setup shouldn't be tripping them as far as I can tell. The video frame buffer get is there as a sanity check and it works exactly as expected.

Addendum: I finally managed to make a C project to test this, and have confirmed that it works fine in raw C. This code should be equivalent to the C# code:

Image

This correctly returns 0 and allocates the buffers, whereas the C# code has the previously described error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions