summaryrefslogtreecommitdiff
path: root/libavformat/rawdec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-07 16:13:33 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 16:03:18 +0200
commit7ca0931fe1782fed54e508850c12bee7ee0a432a (patch)
tree585bc43f9936695584f0ff0ab6ff277f15191e71 /libavformat/rawdec.h
parent6a055bf03612a67280e1188b269d2fa6cb08d3e7 (diff)
downloadffmpeg-7ca0931fe1782fed54e508850c12bee7ee0a432a.tar.gz
avformat/rawdec: Deduplicate AVClasses based upon ff_rawvideo_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.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h
index 3c05795762..18777db290 100644
--- a/libavformat/rawdec.h
+++ b/libavformat/rawdec.h
@@ -24,7 +24,6 @@
#include "avformat.h"
#include "libavutil/log.h"
-#include "libavutil/opt.h"
typedef struct FFRawVideoDemuxerContext {
const AVClass *class; /**< Class for private options. */
@@ -39,7 +38,7 @@ typedef struct FFRawDemuxerContext {
int raw_packet_size;
} FFRawDemuxerContext;
-extern const AVOption ff_rawvideo_options[];
+extern const AVClass ff_rawvideo_demuxer_class;
extern const AVClass ff_raw_demuxer_class;
int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt);
@@ -52,16 +51,7 @@ int ff_raw_subtitle_read_header(AVFormatContext *s);
int ff_raw_data_read_header(AVFormatContext *s);
-#define FF_RAWVIDEO_DEMUXER_CLASS(name)\
-static const AVClass name ## _demuxer_class = {\
- .class_name = #name " demuxer",\
- .item_name = av_default_item_name,\
- .option = ff_rawvideo_options,\
- .version = LIBAVUTIL_VERSION_INT,\
-};
-
#define FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, flag)\
-FF_RAWVIDEO_DEMUXER_CLASS(shortname)\
const AVInputFormat ff_ ## shortname ## _demuxer = {\
.name = #shortname,\
.long_name = NULL_IF_CONFIG_SMALL(longname),\
@@ -72,7 +62,7 @@ const AVInputFormat ff_ ## shortname ## _demuxer = {\
.flags = flag,\
.raw_codec_id = id,\
.priv_data_size = sizeof(FFRawVideoDemuxerContext),\
- .priv_class = &shortname ## _demuxer_class,\
+ .priv_class = &ff_rawvideo_demuxer_class,\
};
#define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\