* @{
*/
attribute_deprecated int get_buffer(AVIOContext *s, unsigned char *buf, int size);
+attribute_deprecated int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size);
attribute_deprecated int get_byte(AVIOContext *s);
attribute_deprecated unsigned int get_le16(AVIOContext *s);
attribute_deprecated unsigned int get_le24(AVIOContext *s);
*/
int avio_read(AVIOContext *s, unsigned char *buf, int size);
-/**
- * Read size bytes from AVIOContext into buf.
- * This reads at most 1 packet. If that is not enough fewer bytes will be
- * returned.
- * @return number of bytes read or AVERROR
- */
-int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size);
-
/** @note return 0 if EOF, so you cannot use it if EOF handling is
necessary */
int avio_r8 (AVIOContext *s);
int64_t (*seek)(void *opaque, int64_t offset, int whence));
+/**
+ * Read size bytes from AVIOContext into buf.
+ * This reads at most 1 packet. If that is not enough fewer bytes will be
+ * returned.
+ * @return number of bytes read or AVERROR
+ */
+int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size);
+
#endif // AVFORMAT_AVIO_INTERNAL_H
{
return avio_read(s, buf, size);
}
+int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size)
+{
+ return ffio_read_partial(s, buf, size);
+}
#endif
int avio_put_str(AVIOContext *s, const char *str)
return size1 - size;
}
-int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size)
+int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size)
{
int len;
*/
#include "avformat.h"
+#include "avio_internal.h"
#include "rawdec.h"
/* raw input */
pkt->pos= url_ftell(s->pb);
pkt->stream_index = 0;
- ret = get_partial_buffer(s->pb, pkt->data, size);
+ ret = ffio_read_partial(s->pb, pkt->data, size);
if (ret < 0) {
av_free_packet(pkt);
return ret;