Commit 98041afb authored by Ronald S. Bultje's avatar Ronald S. Bultje

adpcm: don't duplicate identical AVSampleFmt array for each encoder.

parent 388ff813
...@@ -716,6 +716,9 @@ error: ...@@ -716,6 +716,9 @@ error:
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
static const enum AVSampleFormat sample_fmts[] = {
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
};
#define ADPCM_ENCODER(id_, name_, long_name_) \ #define ADPCM_ENCODER(id_, name_, long_name_) \
AVCodec ff_ ## name_ ## _encoder = { \ AVCodec ff_ ## name_ ## _encoder = { \
...@@ -726,8 +729,7 @@ AVCodec ff_ ## name_ ## _encoder = { \ ...@@ -726,8 +729,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.init = adpcm_encode_init, \ .init = adpcm_encode_init, \
.encode2 = adpcm_encode_frame, \ .encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \ .close = adpcm_encode_close, \
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \ .sample_fmts = sample_fmts, \
AV_SAMPLE_FMT_NONE }, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment