avformat/aptxdec: 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 41ab409332
commit c64cfef91e
  1. 13
      libavformat/aptxdec.c

@ -87,14 +87,14 @@ static const AVOption aptx_options[] = {
{ NULL }, { NULL },
}; };
#if CONFIG_APTX_DEMUXER
static const AVClass aptx_demuxer_class = { static const AVClass aptx_demuxer_class = {
.class_name = "aptx demuxer", .class_name = "aptx (hd) demuxer",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = aptx_options, .option = aptx_options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
#if CONFIG_APTX_DEMUXER
const AVInputFormat ff_aptx_demuxer = { const AVInputFormat ff_aptx_demuxer = {
.name = "aptx", .name = "aptx",
.long_name = NULL_IF_CONFIG_SMALL("raw aptX"), .long_name = NULL_IF_CONFIG_SMALL("raw aptX"),
@ -108,13 +108,6 @@ const AVInputFormat ff_aptx_demuxer = {
#endif #endif
#if CONFIG_APTX_HD_DEMUXER #if CONFIG_APTX_HD_DEMUXER
static const AVClass aptx_hd_demuxer_class = {
.class_name = "aptx hd demuxer",
.item_name = av_default_item_name,
.option = aptx_options,
.version = LIBAVUTIL_VERSION_INT,
};
const AVInputFormat ff_aptx_hd_demuxer = { const AVInputFormat ff_aptx_hd_demuxer = {
.name = "aptx_hd", .name = "aptx_hd",
.long_name = NULL_IF_CONFIG_SMALL("raw aptX HD"), .long_name = NULL_IF_CONFIG_SMALL("raw aptX HD"),
@ -123,6 +116,6 @@ const AVInputFormat ff_aptx_hd_demuxer = {
.read_header = aptx_hd_read_header, .read_header = aptx_hd_read_header,
.read_packet = aptx_hd_read_packet, .read_packet = aptx_hd_read_packet,
.flags = AVFMT_GENERIC_INDEX, .flags = AVFMT_GENERIC_INDEX,
.priv_class = &aptx_hd_demuxer_class, .priv_class = &aptx_demuxer_class,
}; };
#endif #endif

Loading…
Cancel
Save