[FFmpeg-devel] [PATCH 6/7] avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h

Anton Khirnov anton
Sun Mar 6 18:04:51 CET 2011


---
 libavformat/avio.h          |   15 ---------------
 libavformat/avio_internal.h |   14 ++++++++++++++
 libavformat/utils.c         |    1 +
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index 4a1d948..b3bcebf 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -603,21 +603,6 @@ int url_resetbuf(AVIOContext *s, int flags);
 #endif
 
 /**
- * Rewind the AVIOContext 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 AVIOContext 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(AVIOContext *s, unsigned char *buf, int buf_size);
-
-/**
  * Create and initialize a AVIOContext for accessing the
  * resource indicated by url.
  * @note When the resource indicated by url has been opened in
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 31335ef..293f878 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -49,4 +49,18 @@ static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
 
 uint64_t ff_get_v(AVIOContext *bc);
 
+/**
+ * Rewind the AVIOContext 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
+ *
+ * @param s The read-only AVIOContext 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(AVIOContext *s, unsigned char *buf, int buf_size);
+
 #endif // AVFORMAT_AVIO_INTERNAL_H
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 41aa7ec..8f4731d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "avformat.h"
+#include "avio_internal.h"
 #include "internal.h"
 #include "libavcodec/internal.h"
 #include "libavutil/opt.h"
-- 
1.7.4.1




More information about the ffmpeg-devel mailing list