]> git.sesse.net Git - ffmpeg/commitdiff
avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
authorAnton Khirnov <anton@khirnov.net>
Sun, 6 Mar 2011 19:08:30 +0000 (20:08 +0100)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 7 Mar 2011 17:25:36 +0000 (12:25 -0500)
also change its prefix to ffio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavformat/avio.h
libavformat/avio_internal.h
libavformat/aviobuf.c
libavformat/utils.c

index 09777a3615b57647d44f4e604f7d6c6ef58bab53..8bae263833b959f00910c0b42f29a52e850f329c 100644 (file)
@@ -600,21 +600,6 @@ int url_setbufsize(AVIOContext *s, int buf_size);
 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.
index 279c7f60ff06eec7784f17446cd2b66452b097ed..3abb619b8afa112acce7c219c186e6510d432664 100644 (file)
@@ -47,4 +47,18 @@ static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
     avio_wl32(pb, MKTAG(s[0], s[1], s[2], s[3]));
 }
 
+/**
+ * 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 ffio_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size);
+
 #endif // AVFORMAT_AVIO_INTERNAL_H
index 6592e9acd65880e50f60176a8ed1b4e9d1c0e9d2..7762d6cace1e92bc62010376945c04a61d5d78ab 100644 (file)
@@ -837,7 +837,7 @@ static int url_resetbuf(AVIOContext *s, int flags)
     return 0;
 }
 
-int ff_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size)
+int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size)
 {
     int64_t buffer_start;
     int buffer_size;
index abe3cf9021edb2f266e6c36bf0e52ed138537de9..918b07df411daa98e07db828d69e61a8a3653739 100644 (file)
@@ -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"
@@ -585,7 +586,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
     }
 
     /* rewind. reuse probe buffer to avoid seeking */
-    if ((ret = ff_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0)
+    if ((ret = ffio_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0)
         av_free(buf);
 
     return ret;