diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-21 08:56:18 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-21 16:31:15 -0700 |
commit | 98041afb5f50536fa3edde9bed1a586d6e2e56e8 (patch) | |
tree | 1e6841f8e9344cbda1ce10c7573a79b2b37273a4 | |
parent | 388ff813e7329ea9ddb42a28c3bc798e79d06a24 (diff) | |
download | ffmpeg-98041afb5f50536fa3edde9bed1a586d6e2e56e8.tar.gz |
adpcm: don't duplicate identical AVSampleFmt array for each encoder.
-rw-r--r-- | libavcodec/adpcmenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 73c54030b7..fa40c228f3 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -716,6 +716,9 @@ error: return AVERROR(ENOMEM); } +static const enum AVSampleFormat sample_fmts[] = { + AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE +}; #define ADPCM_ENCODER(id_, name_, long_name_) \ AVCodec ff_ ## name_ ## _encoder = { \ @@ -726,8 +729,7 @@ AVCodec ff_ ## name_ ## _encoder = { \ .init = adpcm_encode_init, \ .encode2 = adpcm_encode_frame, \ .close = adpcm_encode_close, \ - .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \ - AV_SAMPLE_FMT_NONE }, \ + .sample_fmts = sample_fmts, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } |