summaryrefslogtreecommitdiff
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
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