X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavformat%2Favformat.h;h=4211a95fca7d90bd5362e8af855e27c49d439230;hb=209001073adf190ccf2e578f25d4b3d41b1640a0;hp=a5d2dd9d2bad42d60b5ff4495aa2cfdcca71123e;hpb=f6f1e1a7a14d0cde4055fa98be2783c5a1131d5b;p=ffmpeg diff --git a/libavformat/avformat.h b/libavformat/avformat.h index a5d2dd9d2ba..4211a95fca7 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2136,6 +2136,24 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, */ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); +/** + * 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 + */ +int avformat_flush(AVFormatContext *s); + /** * Start playing a network-based stream (e.g. RTSP stream) at the * current position.