

If all elements of this array are NULL, then this frame is not reference counted. Field Documentation ◆ bufĪVBuffer references backing the data for this frame. Sizeof(AVFrame) is not a part of the public ABI, so new fields may be added to the end with a minor bump.ĭefinition at line 140 of file frame.h. There may be a single buffer for all the data, or one separate buffer for each plane, or anything in between.

In such a case, every single data plane must be contained in one of the buffers in AVFrame.buf or AVFrame.extended_buf. An AVFrame is considered to be reference counted if at least one reference is set, i.e.

The underlying buffer references are stored in AVFrame.buf / AVFrame.extended_buf. The data described by an AVFrame is usually reference counted through the AVBuffer API. In such a case, av_frame_unref() will free any references held by the frame and reset it to its original clean state before it is reused again. a single AVFrame to hold frames received from a decoder). AVFrame must be freed with av_frame_free().ĪVFrame is typically allocated once and then reused multiple times to hold different data (e.g. Note that this only allocates the AVFrame itself, the buffers for the data must be managed through other means (see below). This structure describes decoded (raw) audio or video data.ĪVFrame must be allocated using av_frame_alloc().
