avformat/avio{,buf}: deprecate AVIOContext::written

Originally added as a private entry in commit
3f75e5116b, 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).
This commit is contained in:
Jan Ekström 2021-10-13 23:05:40 +03:00
parent d39b58dc32
commit a5622ed16f
4 changed files with 25 additions and 1 deletions

View File

@ -14,6 +14,12 @@ libavutil: 2021-04-27
API changes, most recent first:
2021-10-13 - xxxxxxxxxx - lavf 59.7.100 - avio.h
Deprecate AVIOContext.written. Originally added as a private entry in
commit 3f75e5116b900f1428aa13041fc7d6301bf1988a, 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).
2021-09-21 - xxxxxxxxxx - lavu 57.7.100 - pixfmt.h
Add AV_PIX_FMT_X2BGR10.

View File

@ -290,7 +290,13 @@ typedef struct AVIOContext {
*/
int ignore_boundary_point;
#if FF_API_AVIOCONTEXT_WRITTEN
/**
* @deprecated field utilized privately by libavformat.
*/
attribute_deprecated
int64_t written;
#endif
/**
* Maximum reached position before a backward seek in the write buffer,

View File

@ -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->written_output_size) {
ctx->written_output_size = s->pos + len;
#if FF_API_AVIOCONTEXT_WRITTEN
FF_DISABLE_DEPRECATION_WARNINGS
s->written = ctx->written_output_size;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
}
}

View File

@ -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 6
#define LIBAVFORMAT_VERSION_MINOR 7
#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