Function ff_hevc_annexb2mp4

Source
pub unsafe extern "C" fn ff_hevc_annexb2mp4(
    pb: *mut AVIOContext,
    buf_in: *const u8,
    size: c_int,
    filter_ps: c_int,
    ps_count: *mut c_int,
) -> c_int
Expand description

Writes Annex B formatted HEVC NAL units to the provided AVIOContext.

The NAL units are converted to an MP4-compatible format (start code prefixes are replaced by 4-byte size fields, as per ISO/IEC 14496-15).

If filter_ps is non-zero, any HEVC parameter sets found in the input will be discarded, and *ps_count will be set to the number of discarded PS NAL units.

@param pb address of the AVIOContext where the data shall be written @param buf_in address of the buffer holding the input data @param size size (in bytes) of the input buffer @param filter_ps whether to write parameter set NAL units to the output (0) or to discard them (non-zero) @param ps_count address of the variable where the number of discarded parameter set NAL units shall be written, may be NULL @return the amount (in bytes) of data written in case of success, a negative value corresponding to an AVERROR code in case of failure