summaryrefslogtreecommitdiff
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-12-18 13:20:15 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-01-15 21:24:17 -0500
commitb2c75b6e6320b1a399d76913f9d98c56f386f98b (patch)
tree72a0e973e1069acf8e9f84756742a116b430c4d9 /libavcodec/pcm.c
parent5ee5fa021f32e0506bed6ebd183c807d5162bc72 (diff)
avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()
This allows audio encoders to optionally take an AVFrame as input and write encoded output to an AVPacket. This also adds AVCodec.encode2() which will also be usable by video and subtitle encoders once support is implemented in the public functions.
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 32231125d2..190f027adc 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -474,6 +474,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.init = pcm_encode_init, \
.encode = pcm_encode_frame, \
.close = pcm_encode_close, \
+ .capabilities = CODEC_CAP_VARIABLE_FRAME_SIZE, \
.sample_fmts = (const enum AVSampleFormat[]){sample_fmt_,AV_SAMPLE_FMT_NONE}, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
}