aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2008-07-31 10:47:31 +0000
committerPeter Ross <pross@xvid.org>2008-07-31 10:47:31 +0000
commitfd76c37fd9f564b4e979fbe20ecfcfad13f8b4f4 (patch)
treee391aec76fcfa666a50c7ccce172ff7a8d140da9 /libavcodec/g726.c
parentc8fd5da42fffc92268a0e23335af36580f2a2a4b (diff)
downloadffmpeg-fd76c37fd9f564b4e979fbe20ecfcfad13f8b4f4.tar.gz
Modify all codecs to report their supported input and output sample format(s).
Originally committed as revision 14482 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r--libavcodec/g726.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index bace3d045b..463d993137 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -323,6 +323,9 @@ static av_cold int g726_init(AVCodecContext * avctx)
return AVERROR(ENOMEM);
avctx->coded_frame->key_frame = 1;
+ if (avctx->codec->decode)
+ avctx->sample_fmt = SAMPLE_FMT_S16;
+
return 0;
}
@@ -381,6 +384,7 @@ AVCodec adpcm_g726_encoder = {
g726_encode_frame,
g726_close,
NULL,
+ .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
};
#endif //CONFIG_ENCODERS