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.c | |
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.c')
-rw-r--r-- | libavformat/rawdec.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index a1f593c66a..aa6eba4f39 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -125,14 +125,19 @@ const AVOption ff_rawvideo_options[] = { }; #undef OFFSET #define OFFSET(x) offsetof(FFRawDemuxerContext, x) -const AVOption ff_raw_options[] = { +static const AVOption raw_options[] = { { "raw_packet_size", "", OFFSET(raw_packet_size), AV_OPT_TYPE_INT, {.i64 = RAW_PACKET_SIZE }, 1, INT_MAX, DEC}, { NULL }, }; -#if CONFIG_DATA_DEMUXER -FF_RAW_DEMUXER_CLASS(raw_data) +const AVClass ff_raw_demuxer_class = { + .class_name = "generic raw demuxer", + .item_name = av_default_item_name, + .option = raw_options, + .version = LIBAVUTIL_VERSION_INT, +}; +#if CONFIG_DATA_DEMUXER const AVInputFormat ff_data_demuxer = { .name = "data", .long_name = NULL_IF_CONFIG_SMALL("raw data"), @@ -141,7 +146,7 @@ const AVInputFormat ff_data_demuxer = { .raw_codec_id = AV_CODEC_ID_NONE, .flags = AVFMT_NOTIMESTAMPS, .priv_data_size = sizeof(FFRawDemuxerContext),\ - .priv_class = &raw_data_demuxer_class,\ + .priv_class = &ff_raw_demuxer_class, }; #endif |