diff options
author | wm4 | 2014-09-30 18:46:49 +0200 |
---|---|---|
committer | Michael Niedermayer | 2015-03-05 00:09:26 +0100 |
commit | cca44764b9def05d90d051b24a84369f9891a460 (patch) | |
tree | 30b6187baa1ff54514b48b4ffae443646fac768b /libavformat/avformat.h | |
parent | 83808ee7e9e89b0c83d5ecd94b35952c44716b68 (diff) |
avformat: add avformat_flush()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index a5d2dd9d2b..e47df0511b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2137,6 +2137,23 @@ 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 headerless + * formats. + * + * 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. */ |