avformat/g726: 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>
pull/359/head
Andreas Rheinhardt 4 years ago
parent e4ee2a0629
commit cd0ab3526d
  1. 15
      libavformat/g726.c

@ -65,33 +65,26 @@ static const AVOption options[] = {
{ NULL }, { NULL },
}; };
#if CONFIG_G726_DEMUXER static const AVClass g726_demuxer_class = {
static const AVClass g726le_demuxer_class = { .class_name = "G.726 demuxer",
.class_name = "G.726 big-endian demuxer",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
#if CONFIG_G726_DEMUXER
const AVInputFormat ff_g726_demuxer = { const AVInputFormat ff_g726_demuxer = {
.name = "g726", .name = "g726",
.long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left aligned\")"), .long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left aligned\")"),
.read_header = g726_read_header, .read_header = g726_read_header,
.read_packet = g726_read_packet, .read_packet = g726_read_packet,
.priv_data_size = sizeof(G726Context), .priv_data_size = sizeof(G726Context),
.priv_class = &g726le_demuxer_class, .priv_class = &g726_demuxer_class,
.raw_codec_id = AV_CODEC_ID_ADPCM_G726, .raw_codec_id = AV_CODEC_ID_ADPCM_G726,
}; };
#endif #endif
#if CONFIG_G726LE_DEMUXER #if CONFIG_G726LE_DEMUXER
static const AVClass g726_demuxer_class = {
.class_name = "G.726 little-endian demuxer",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
const AVInputFormat ff_g726le_demuxer = { const AVInputFormat ff_g726le_demuxer = {
.name = "g726le", .name = "g726le",
.long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right aligned\")"), .long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right aligned\")"),

Loading…
Cancel
Save