Skip to main content

video_frame_from

Function video_frame_from 

Source
pub fn video_frame_from(
    frame: &Frame,
    time_base: Timebase,
) -> Result<VideoFrame<PixelFormat, VideoFrameExtra, FfmpegBuffer>, ConvertError>
Expand description

Safe wrapper around av_frame_to_video_frame taking a borrowed ffmpeg::Frame. Recommended entry point for most callers — equivalent to passing frame.as_ptr() to the unsafe variant, but the FFmpeg side keeps the frame alive for the duration of the call so the safety contract is satisfied internally.