Commit f9f34cb9 authored by Luca Barbato's avatar Luca Barbato

ogg: Use separate classes for the aliases

Unbreak 051aadee
parent 3526ab89
...@@ -84,14 +84,14 @@ static const AVOption options[] = { ...@@ -84,14 +84,14 @@ static const AVOption options[] = {
{ NULL }, { NULL },
}; };
static const AVClass ogg_muxer_class = { #define OGG_CLASS(flavor)\
.class_name = "Ogg muxer", static const AVClass flavor ## _muxer_class = {\
.item_name = av_default_item_name, .class_name = #flavor " muxer",\
.option = options, .item_name = av_default_item_name,\
.version = LIBAVUTIL_VERSION_INT, .option = options,\
.version = LIBAVUTIL_VERSION_INT,\
}; };
static void ogg_update_checksum(AVFormatContext *s, AVIOContext *pb, int64_t crc_offset) static void ogg_update_checksum(AVFormatContext *s, AVIOContext *pb, int64_t crc_offset)
{ {
int64_t pos = avio_tell(pb); int64_t pos = avio_tell(pb);
...@@ -628,6 +628,7 @@ static int ogg_write_trailer(AVFormatContext *s) ...@@ -628,6 +628,7 @@ static int ogg_write_trailer(AVFormatContext *s)
} }
#if CONFIG_OGG_MUXER #if CONFIG_OGG_MUXER
OGG_CLASS(ogg)
AVOutputFormat ff_ogg_muxer = { AVOutputFormat ff_ogg_muxer = {
.name = "ogg", .name = "ogg",
.long_name = NULL_IF_CONFIG_SMALL("Ogg"), .long_name = NULL_IF_CONFIG_SMALL("Ogg"),
...@@ -646,6 +647,7 @@ AVOutputFormat ff_ogg_muxer = { ...@@ -646,6 +647,7 @@ AVOutputFormat ff_ogg_muxer = {
#endif #endif
#if CONFIG_OGA_MUXER #if CONFIG_OGA_MUXER
OGG_CLASS(oga)
AVOutputFormat ff_oga_muxer = { AVOutputFormat ff_oga_muxer = {
.name = "oga", .name = "oga",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"), .long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"),
...@@ -658,11 +660,12 @@ AVOutputFormat ff_oga_muxer = { ...@@ -658,11 +660,12 @@ AVOutputFormat ff_oga_muxer = {
.write_packet = ogg_write_packet, .write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer, .write_trailer = ogg_write_trailer,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
.priv_class = &ogg_muxer_class, .priv_class = &oga_muxer_class,
}; };
#endif #endif
#if CONFIG_SPX_MUXER #if CONFIG_SPX_MUXER
OGG_CLASS(spx)
AVOutputFormat ff_spx_muxer = { AVOutputFormat ff_spx_muxer = {
.name = "spx", .name = "spx",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"), .long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"),
...@@ -674,11 +677,12 @@ AVOutputFormat ff_spx_muxer = { ...@@ -674,11 +677,12 @@ AVOutputFormat ff_spx_muxer = {
.write_packet = ogg_write_packet, .write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer, .write_trailer = ogg_write_trailer,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
.priv_class = &ogg_muxer_class, .priv_class = &spx_muxer_class,
}; };
#endif #endif
#if CONFIG_OPUS_MUXER #if CONFIG_OPUS_MUXER
OGG_CLASS(opus)
AVOutputFormat ff_opus_muxer = { AVOutputFormat ff_opus_muxer = {
.name = "opus", .name = "opus",
.long_name = NULL_IF_CONFIG_SMALL("Ogg Opus"), .long_name = NULL_IF_CONFIG_SMALL("Ogg Opus"),
...@@ -690,6 +694,6 @@ AVOutputFormat ff_opus_muxer = { ...@@ -690,6 +694,6 @@ AVOutputFormat ff_opus_muxer = {
.write_packet = ogg_write_packet, .write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer, .write_trailer = ogg_write_trailer,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
.priv_class = &ogg_muxer_class, .priv_class = &opus_muxer_class,
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment