diff options
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index 649de15ea9..d186876051 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -433,6 +433,21 @@ int url_resetbuf(ByteIOContext *s, int flags); #endif /** + * Rewinds the ByteIOContext using the specified buffer containing the first buf_size bytes of the file. + * Used after probing to avoid seeking. + * Joins buf and s->buffer, taking any overlap into consideration. + * @note s->buffer must overlap with buf or they can't be joined and the function fails + * @note This function is NOT part of the public API + * + * @param s The read-only ByteIOContext to rewind + * @param buf The probe buffer containing the first buf_size bytes of the file + * @param buf_size The size of buf + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ff_rewind_with_probe_data(ByteIOContext *s, unsigned char *buf, int buf_size); + +/** * Creates and initializes a ByteIOContext for accessing the * resource indicated by url. * @note When the resource indicated by url has been opened in |