[vlc-devel] [RFC 1/2] avcodec: encoder: Always provide frame dimension and pixel format

Luca Barbato lu_zero at gentoo.org
Tue Mar 29 18:01:20 CEST 2016


On 28/03/16 14:28, Hugo Beauzée-Luyssen wrote:
> av_frame_unref will clear most of the frame fields, including dimension
> & pixel format. This causes some encoders (at least the raw encoder) to
> reject the frame.

s/clear/reset/
s/most/all/

You are creating a new frame using some cached frame structure.

The first action in the loop is to _unref the frame, resetting it to the
default values, then you are populating the frame data pointers and
other properties.

Makes sense to provide also those, why you'd expect _unref to preserve a
specific field?

lu


More information about the vlc-devel mailing list