Function ffmpeg_sys::avcodec_alloc_context3[][src]

pub unsafe extern "C" fn avcodec_alloc_context3(
    codec: *const AVCodec
) -> *mut AVCodecContext
Expand description

Allocate an AVCodecContext and set its fields to default values. The resulting struct should be freed with avcodec_free_context().

@param codec if non-NULL, allocate private data and initialize defaults for the given codec. It is illegal to then call avcodec_open2() with a different codec. If NULL, then the codec-specific defaults won’t be initialized, which may result in suboptimal default settings (this is important mainly for encoders, e.g. libx264).

@return An AVCodecContext filled with default values or NULL on failure.