@@ -14,6 +14,15 @@ libavutil: 2021-04-27
API changes, most recent first:
+2021-10-13 - xxxxxxxxxx - lavf 59.8.100 - avio.h
+ Deprecate AVIOContext.written. Originally added as a private entry in
+ commit 3f75e5116b900f1428aa13041fc7d6301bf1988a, but its grouping with
+ the comment noting its private state was missed during merging of the field
+ from Libav (most likely due to an already existing field in between).
+
+ Users should migrate to the public field AVIOContext.bytes_written, which
+ returns the same value.
+
2021-09-26 - xxxxxxxxxx - lavf 59.7.100 - avio.h
Introduce public bytes_{read,written} statistic fields to AVIOContext.
@@ -290,7 +290,13 @@ typedef struct AVIOContext {
*/
int ignore_boundary_point;
+#if FF_API_AVIOCONTEXT_WRITTEN
+ /**
+ * @deprecated AVIOContext::bytes_written should be utilized instead.
+ */
+ attribute_deprecated
int64_t written;
+#endif
/**
* Maximum reached position before a backward seek in the write buffer,
@@ -22,6 +22,7 @@
#include "libavutil/bprint.h"
#include "libavutil/crc.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
@@ -124,7 +125,11 @@ void ffio_init_context(FFIOContext *ctx,
ctx->current_type = AVIO_DATA_MARKER_UNKNOWN;
ctx->last_time = AV_NOPTS_VALUE;
ctx->short_seek_get = NULL;
+#if FF_API_AVIOCONTEXT_WRITTEN
+FF_DISABLE_DEPRECATION_WARNINGS
s->written = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
AVIOContext *avio_alloc_context(
@@ -166,7 +171,11 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len)
} else {
if (s->pos + len > ctx->bytes_written) {
s->bytes_written = ctx->bytes_written = s->pos + len;
+#if FF_API_AVIOCONTEXT_WRITTEN
+FF_DISABLE_DEPRECATION_WARNINGS
s->written = ctx->bytes_written;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
}
}
@@ -32,7 +32,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 59
-#define LIBAVFORMAT_VERSION_MINOR 7
+#define LIBAVFORMAT_VERSION_MINOR 8
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -61,6 +61,9 @@
#ifndef FF_API_COMPUTE_PKT_FIELDS2
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
#endif
+#ifndef FF_API_AVIOCONTEXT_WRITTEN
+#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
+#endif
#ifndef FF_API_R_FRAME_RATE