summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-15 15:55:42 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-07 20:22:22 +0200
commit0f6b34bfeca799ffdeefa10581563a329f1915ef (patch)
treebf625400bda2adda78828d68b1f381d36f753a33 /libavformat/avformat.h
parent758e2da28939c156b18c11c3993ea068da3ea869 (diff)
downloadffmpeg-0f6b34bfeca799ffdeefa10581563a329f1915ef.tar.gz
avformat: Add internal flags for AV(In|Out)putFormat
Both AVInputFormat and AVOutputFormat currently lack an equivalent to AVCodec's caps_internal. E.g. if reading a header fails, each demuxer is currently required to clean up manually, which often means to just call the demuxer's read_close function. This could (and will) be done generically via an equivalent of FF_CODEC_CAP_INIT_CLEANUP. Because of the unholy ABI-relationship between libavdevice and libavformat adding such a flag is only possible when the ABI is open (despite the flag not being part of the public API), such as now. Therefore such a flag is also added to AVOutputFormat, despite there being no immediate use for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cd7b0d941c..81d2ac38d0 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -535,6 +535,11 @@ typedef struct AVOutputFormat {
*/
int priv_data_size;
+ /**
+ * Internal flags. See FF_FMT_FLAG_* in internal.h.
+ */
+ int flags_internal;
+
int (*write_header)(struct AVFormatContext *);
/**
* Write a packet. If AVFMT_ALLOW_FLUSH is set in flags,
@@ -675,6 +680,11 @@ typedef struct AVInputFormat {
int priv_data_size;
/**
+ * Internal flags. See FF_FMT_FLAG_* in internal.h.
+ */
+ int flags_internal;
+
+ /**
* Tell if a given file has a chance of being parsed as this format.
* The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
* big so you do not have to check for that unless you need more.