diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-01-27 15:06:00 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-02-09 15:24:15 +0100 |
commit | 59c9dc82f450638a3068deeb1db5c56f6d155752 (patch) | |
tree | 936dabca4a3e593553f6e0c8409e530111c99c0c /libavformat/srtenc.c | |
parent | f23ae839fc184c4492e10f371cde5c1b55e51522 (diff) |
avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f972701806be20a77f808db332d9489343bb78 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.
This does not affect/improve extensibility of both public
or private fields for muxers (it is still a mess due to lavd).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/srtenc.c')
-rw-r--r-- | libavformat/srtenc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 7f6171edd3..30dc59e0f8 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -21,6 +21,7 @@ #include "avformat.h" #include "internal.h" +#include "mux.h" #include "libavutil/log.h" #include "libavutil/intreadwrite.h" @@ -96,14 +97,14 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) return 0; } -const AVOutputFormat ff_srt_muxer = { - .name = "srt", - .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), - .mime_type = "application/x-subrip", - .extensions = "srt", +const FFOutputFormat ff_srt_muxer = { + .p.name = "srt", + .p.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), + .p.mime_type = "application/x-subrip", + .p.extensions = "srt", + .p.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT, + .p.subtitle_codec = AV_CODEC_ID_SUBRIP, .priv_data_size = sizeof(SRTContext), .write_header = srt_write_header, .write_packet = srt_write_packet, - .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT, - .subtitle_codec = AV_CODEC_ID_SUBRIP, }; |