Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2021-10-13 23:05:40 +0300
committerJan Ekström <jeebjp@gmail.com>2021-10-24 13:04:39 +0300
commita5622ed16f8e22a80cecd8936799e61f61a74cd5 (patch)
treecc21b0c91593e7cb0f8393969f69c092f88d272b /libavformat/aviobuf.c
parentd39b58dc32b5fc7b480eeb9ef00a610732f02c2c (diff)
avformat/avio{,buf}: 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).
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index b18a56ef19..f21f1c89df 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -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
}
}
}