From 233e13f285c9f0169b62fea38d6c09f15186fa5f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 15 Mar 2024 18:18:23 +0100 Subject: avformat/mux: Rename FF_FMT_ALLOW_FLUSH->FF_OFMT_FLAG_ALLOW_FLUSH It better reflects that this is a muxer-only flag. Also document the flag. Signed-off-by: Andreas Rheinhardt --- libavformat/mux.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libavformat/mux.h') diff --git a/libavformat/mux.h b/libavformat/mux.h index b9ec75641d..bd3eb53380 100644 --- a/libavformat/mux.h +++ b/libavformat/mux.h @@ -27,7 +27,15 @@ struct AVDeviceInfoList; -#define FF_FMT_ALLOW_FLUSH (1 << 1) +/** + * This flag indicates that the muxer stores data internally + * and supports flushing it. Flushing is signalled by sending + * a NULL packet to the muxer's write_packet callback; + * without this flag, a muxer never receives NULL packets. + * So the documentation of write_packet below for the semantics + * of the return value in case of flushing. + */ +#define FF_OFMT_FLAG_ALLOW_FLUSH (1 << 1) typedef struct FFOutputFormat { /** @@ -40,13 +48,13 @@ typedef struct FFOutputFormat { int priv_data_size; /** - * Internal flags. See FF_FMT_* in internal.h and mux.h. + * Internal flags. See FF_OFMT_FLAG_* above and FF_FMT_FLAG_* in internal.h. */ int flags_internal; int (*write_header)(AVFormatContext *); /** - * Write a packet. If FF_FMT_ALLOW_FLUSH is set in flags_internal, + * Write a packet. If FF_OFMT_FLAG_ALLOW_FLUSH is set in flags_internal, * pkt can be NULL in order to flush data buffered in the muxer. * When flushing, return 0 if there still is more data to flush, * or 1 if everything was flushed and there is no more buffered -- cgit v1.2.3