aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-07 16:13:33 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 16:03:18 +0200
commitd0293c770bbc747ba8eaa310f7b3632207a36ebd (patch)
tree4227600597c3bf175f1d20093423788885df09a8 /libavformat/oggenc.c
parent50e523144a24657f5a79c141486168a0228dd041 (diff)
downloadffmpeg-d0293c770bbc747ba8eaa310f7b3632207a36ebd.tar.gz
avformat/oggenc: Deduplicate AVClasses
The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index af27957c75..aff0ca6b96 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -91,12 +91,11 @@ static const AVOption options[] = {
{ NULL },
};
-#define OGG_CLASS(flavor, name)\
-static const AVClass flavor ## _muxer_class = {\
- .class_name = #name " muxer",\
- .item_name = av_default_item_name,\
- .option = options,\
- .version = LIBAVUTIL_VERSION_INT,\
+static const AVClass ogg_muxer_class = {
+ .class_name = "Ogg (audio/video/Speex/Opus) muxer",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static void ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags)
@@ -744,7 +743,6 @@ static void ogg_free(AVFormatContext *s)
}
#if CONFIG_OGG_MUXER
-OGG_CLASS(ogg, Ogg)
const AVOutputFormat ff_ogg_muxer = {
.name = "ogg",
.long_name = NULL_IF_CONFIG_SMALL("Ogg"),
@@ -775,7 +773,6 @@ const AVOutputFormat ff_ogg_muxer = {
#endif
#if CONFIG_OGA_MUXER
-OGG_CLASS(oga, Ogg audio)
const AVOutputFormat ff_oga_muxer = {
.name = "oga",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"),
@@ -789,12 +786,11 @@ const AVOutputFormat ff_oga_muxer = {
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
- .priv_class = &oga_muxer_class,
+ .priv_class = &ogg_muxer_class,
};
#endif
#if CONFIG_OGV_MUXER
-OGG_CLASS(ogv, Ogg video)
const AVOutputFormat ff_ogv_muxer = {
.name = "ogv",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Video"),
@@ -811,12 +807,11 @@ const AVOutputFormat ff_ogv_muxer = {
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
- .priv_class = &ogv_muxer_class,
+ .priv_class = &ogg_muxer_class,
};
#endif
#if CONFIG_SPX_MUXER
-OGG_CLASS(spx, Ogg Speex)
const AVOutputFormat ff_spx_muxer = {
.name = "spx",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"),
@@ -830,12 +825,11 @@ const AVOutputFormat ff_spx_muxer = {
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
- .priv_class = &spx_muxer_class,
+ .priv_class = &ogg_muxer_class,
};
#endif
#if CONFIG_OPUS_MUXER
-OGG_CLASS(opus, Ogg Opus)
const AVOutputFormat ff_opus_muxer = {
.name = "opus",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Opus"),
@@ -849,6 +843,6 @@ const AVOutputFormat ff_opus_muxer = {
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
- .priv_class = &opus_muxer_class,
+ .priv_class = &ogg_muxer_class,
};
#endif