跳到主要内容

avformat_flush

搜索

函数 avformat_flush 

源代码
pub unsafe extern "C" fn avformat_flush(
    s: *mut AVFormatContext,
) -> c_int
展开描述

Discard all internally buffered data. This can be useful when dealing with discontinuities in the byte stream. Generally works only with formats that can resync. This includes headerless formats like MPEG-TS/TS but should also work with NUT, Ogg and in a limited way AVI for example.

The set of streams, the detected duration, stream parameters and codecs do not change when calling this function. If you want a complete reset, it’s better to open a new AVFormatContext.

This does not flush the AVIOContext (s->pb). If necessary, call avio_flush(s->pb) before calling this function.

@param s media file handle @return >=0 on success, error code otherwise