aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/fifo.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-26 00:40:29 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-03 01:45:46 +0200
commitdd48e49d5476178db2478598dbcccccf84923d13 (patch)
treedab4d3fac643c0dd6191b73841555272e03e7921 /libavformat/fifo.c
parent0d596776c63a33887526b416dbf0353bc3821437 (diff)
downloadffmpeg-dd48e49d5476178db2478598dbcccccf84923d13.tar.gz
avformat/avformat: Deprecate AVFMT_ALLOW_FLUSH
It is of no value to the user, because every muxer can always be flushed with a NULL packet. As its documentation shows ("If not set, the muxer will not receive a NULL packet in the write_packet function") it is actually an internal flag that has been publically exposed because there was no internal flags field for output formats for a long time. But now there is and so use it by replacing the public flag with a private one. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/fifo.c')
-rw-r--r--libavformat/fifo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/fifo.c b/libavformat/fifo.c
index 9a3a23729c..8fb4975a5c 100644
--- a/libavformat/fifo.c
+++ b/libavformat/fifo.c
@@ -715,11 +715,16 @@ const FFOutputFormat ff_fifo_muxer = {
.p.name = "fifo",
.p.long_name = NULL_IF_CONFIG_SMALL("FIFO queue pseudo-muxer"),
.p.priv_class = &fifo_muxer_class,
+#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
+#else
+ .p.flags = AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
+#endif
.priv_data_size = sizeof(FifoContext),
.init = fifo_init,
.write_header = fifo_write_header,
.write_packet = fifo_write_packet,
.write_trailer = fifo_write_trailer,
.deinit = fifo_deinit,
+ .flags_internal = FF_FMT_ALLOW_FLUSH,
};