diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-06-07 16:13:33 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-08 16:03:18 +0200 |
commit | 6a055bf03612a67280e1188b269d2fa6cb08d3e7 (patch) | |
tree | 32d0241612285cf46dc451fb5a70281f8198958b /libavformat/rawdec.h | |
parent | 168565ce44308451a50b3ece731727988e0f2389 (diff) | |
download | ffmpeg-6a055bf03612a67280e1188b269d2fa6cb08d3e7.tar.gz |
avformat/rawdec: Deduplicate AVClasses based upon ff_raw_options
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/rawdec.h')
-rw-r--r-- | libavformat/rawdec.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h index e64ad8010c..3c05795762 100644 --- a/libavformat/rawdec.h +++ b/libavformat/rawdec.h @@ -40,7 +40,7 @@ typedef struct FFRawDemuxerContext { } FFRawDemuxerContext; extern const AVOption ff_rawvideo_options[]; -extern const AVOption ff_raw_options[]; +extern const AVClass ff_raw_demuxer_class; int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt); @@ -52,14 +52,6 @@ int ff_raw_subtitle_read_header(AVFormatContext *s); int ff_raw_data_read_header(AVFormatContext *s); -#define FF_RAW_DEMUXER_CLASS(name)\ -static const AVClass name ## _demuxer_class = {\ - .class_name = #name " demuxer",\ - .item_name = av_default_item_name,\ - .option = ff_raw_options,\ - .version = LIBAVUTIL_VERSION_INT,\ -}; - #define FF_RAWVIDEO_DEMUXER_CLASS(name)\ static const AVClass name ## _demuxer_class = {\ .class_name = #name " demuxer",\ @@ -86,16 +78,7 @@ const AVInputFormat ff_ ## shortname ## _demuxer = {\ #define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\ FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, AVFMT_GENERIC_INDEX) -#define FF_RAWSUB_DEMUXER_CLASS(name)\ -static const AVClass name ## _demuxer_class = {\ - .class_name = #name " demuxer",\ - .item_name = av_default_item_name,\ - .option = ff_raw_options,\ - .version = LIBAVUTIL_VERSION_INT,\ -}; - #define FF_DEF_RAWSUB_DEMUXER(shortname, longname, probe, ext, id, flag)\ -FF_RAWSUB_DEMUXER_CLASS(shortname)\ const AVInputFormat ff_ ## shortname ## _demuxer = {\ .name = #shortname,\ .long_name = NULL_IF_CONFIG_SMALL(longname),\ @@ -106,7 +89,7 @@ const AVInputFormat ff_ ## shortname ## _demuxer = {\ .flags = flag,\ .raw_codec_id = id,\ .priv_data_size = sizeof(FFRawDemuxerContext),\ - .priv_class = &shortname ## _demuxer_class,\ + .priv_class = &ff_raw_demuxer_class,\ }; #endif /* AVFORMAT_RAWDEC_H */ |