diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-10-10 01:39:06 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-10-10 18:56:55 +0200 |
commit | b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6 (patch) | |
tree | ae7c5381b40d294367055e4f4de87c90289709c8 /libavformat/avio.h | |
parent | 82569b01a1cb0fee29c839a264af974f9c215d74 (diff) | |
download | ffmpeg-b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6.tar.gz |
avio: introduce avio_closep
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 96e8e1ce77..b6d3cb33b2 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -353,10 +353,25 @@ int avio_open2(AVIOContext **s, const char *url, int flags, * resource. * * @return 0 on success, an AVERROR < 0 on error. + * @see avio_closep */ int avio_close(AVIOContext *s); /** + * Close the resource accessed by the AVIOContext *s, free it + * and set the pointer pointing to it to NULL. + * This function can only be used if s was opened by avio_open(). + * + * The internal buffer is automatically flushed before closing the + * resource. + * + * @return 0 on success, an AVERROR < 0 on error. + * @see avio_close + */ +int avio_closep(AVIOContext **s); + + +/** * Open a write only memory stream. * * @param s new IO context |