1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.

Temporary fix until AVClass::child_class_next is gone.

Reviewed-By: James Almer <jamrial@gmail.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
Zane van Iperen 2021-04-01 20:31:35 +10:00
parent 3ce8d09244
commit aa1cfe05a5
No known key found for this signature in database
GPG Key ID: 68616B2D8AC4DCC5

View File

@ -959,14 +959,14 @@ static const AVOption options[] = {
{ NULL }
};
static const AVClass adpcm_encoder_class = {
.class_name = "ADPCM Encoder",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
#define ADPCM_ENCODER(id_, name_, sample_fmts_, capabilities_, long_name_) \
static const AVClass name_ ## _encoder_class = { \
.class_name = #name_, \
.item_name = av_default_item_name, \
.option = options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
\
AVCodec ff_ ## name_ ## _encoder = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
@ -979,7 +979,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.sample_fmts = sample_fmts_, \
.capabilities = capabilities_, \
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \
.priv_class = &adpcm_encoder_class, \
.priv_class = &name_ ## _encoder_class, \
}
ADPCM_ENCODER(AV_CODEC_ID_ADPCM_ARGO, adpcm_argo, sample_fmts_p, 0, "ADPCM Argonaut Games");