AVCodecContext.get_format

callback to negotiate the pixelFormat @param fmt is the list of formats which are supported by the codec, it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. The first is always the native one. @note The callback may be called again immediately if initialization for the selected (hardware-accelerated) pixel format failed. @warning Behavior is undefined if the callback returns a value not in the fmt list of formats. @return the chosen format - encoding: unused - decoding: Set by user, if not set the native format will be chosen.

struct AVCodecContext
AVPixelFormat function(AVCodecContext* s, const AVPixelFormat* fmt) get_format;

Meta