History

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).

Jan Ekström committed 5 years ago

Commit a5622ed1 parent d39b58d4 files · +25 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +6 −0
  2. libavformat/avio.h +6 −0
  3. libavformat/aviobuf.c +9 −0
  4. libavformat/version.h +4 −1
doc/APIchanges+6−0
@@ -14,6 +14,12 @@ libavutil: 2021-04-27 · 13 unmodified lines
1414
1515 API changes, most recent first:
1616
17+2021-10-13 - xxxxxxxxxx - lavf 59.7.100 - avio.h
18+ Deprecate AVIOContext.written. Originally added as a private entry in
19+ commit 3f75e5116b900f1428aa13041fc7d6301bf1988a, its grouping with
20+ the comment noting its private state was missed during merging of the field
21+ from Libav (most likely due to an already existing field in between).
22+
1723 2021-09-21 - xxxxxxxxxx - lavu 57.7.100 - pixfmt.h
1824 Add AV_PIX_FMT_X2BGR10.
1925
libavformat/avio.h+6−0
@@ -290,7 +290,13 @@ typedef struct AVIOContext { · 289 unmodified lines
290290 */
291291 int ignore_boundary_point;
292292
293+#if FF_API_AVIOCONTEXT_WRITTEN
294+ /**
295+ * @deprecated field utilized privately by libavformat.
296+ */
297+ attribute_deprecated
293298 int64_t written;
299+#endif
294300
295301 /**
296302 * Maximum reached position before a backward seek in the write buffer,
libavformat/aviobuf.c+9−0
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include "libavutil/bprint.h"
2323 #include "libavutil/crc.h"
2424 #include "libavutil/dict.h"
25+#include "libavutil/internal.h"
2526 #include "libavutil/intreadwrite.h"
2627 #include "libavutil/log.h"
2728 #include "libavutil/opt.h"
@@ -124,7 +125,11 @@ void ffio_init_context(FFIOContext *ctx, · 96 unmodified lines
124125 ctx->current_type = AVIO_DATA_MARKER_UNKNOWN;
125126 ctx->last_time = AV_NOPTS_VALUE;
126127 ctx->short_seek_get = NULL;
128+#if FF_API_AVIOCONTEXT_WRITTEN
129+FF_DISABLE_DEPRECATION_WARNINGS
127130 s->written = 0;
131+FF_ENABLE_DEPRECATION_WARNINGS
132+#endif
128133 }
129134
130135 AVIOContext *avio_alloc_context(
@@ -166,7 +171,11 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len) · 35 unmodified lines
166171 } else {
167172 if (s->pos + len > ctx->written_output_size) {
168173 ctx->written_output_size = s->pos + len;
174+#if FF_API_AVIOCONTEXT_WRITTEN
175+FF_DISABLE_DEPRECATION_WARNINGS
169176 s->written = ctx->written_output_size;
177+FF_ENABLE_DEPRECATION_WARNINGS
178+#endif
170179 }
171180 }
172181 }
libavformat/version.h+4−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
3333 // Also please add any ticket numbers that you believe might be affected here
3434 #define LIBAVFORMAT_VERSION_MAJOR 59
35−#define LIBAVFORMAT_VERSION_MINOR 6
35+#define LIBAVFORMAT_VERSION_MINOR 7
3636 #define LIBAVFORMAT_VERSION_MICRO 100
3737
3838 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -61,6 +61,9 @@ · 22 unmodified lines
6161 #ifndef FF_API_COMPUTE_PKT_FIELDS2
6262 #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
6363 #endif
64+#ifndef FF_API_AVIOCONTEXT_WRITTEN
65+#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
66+#endif
6467
6568
6669 #ifndef FF_API_R_FRAME_RATE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t