History

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

Ronald S. Bultje committed 14 years ago

Commit 98041af1 parent 388ff811 file · +4 −2Browse files

Unified · Split

libavcodec/adpcmenc.c+4−2
@@ -716,6 +716,9 @@ error: · 715 unmodified lines
716 return AVERROR(ENOMEM);716 return AVERROR(ENOMEM);
717}717}
718 718
719static const enum AVSampleFormat sample_fmts[] = {
720 AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
721};
719 722
720#define ADPCM_ENCODER(id_, name_, long_name_) \723#define ADPCM_ENCODER(id_, name_, long_name_) \
721AVCodec ff_ ## name_ ## _encoder = { \724AVCodec ff_ ## name_ ## _encoder = { \
@@ -726,8 +729,7 @@ AVCodec ff_ ## name_ ## _encoder = { \ · 4 unmodified lines
726 .init = adpcm_encode_init, \729 .init = adpcm_encode_init, \
727 .encode2 = adpcm_encode_frame, \730 .encode2 = adpcm_encode_frame, \
728 .close = adpcm_encode_close, \731 .close = adpcm_encode_close, \
729 .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \732 .sample_fmts = sample_fmts, \
730 AV_SAMPLE_FMT_NONE }, \
731 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \733 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
732}734}
733 735

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t