]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nellymoserenc.c
imc: fix undefined float to int conversion
[ffmpeg] / libavcodec / nellymoserenc.c
index 1f9442cf9df3e57a1dc054dd6e7003aed0fb5e81..a596926f5013b8ae894e71d6a1f25f4c8c0ad6ab 100644 (file)
@@ -351,7 +351,7 @@ static void encode_block(NellyMoserEncodeContext *s, unsigned char *output, int
 static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, void *data)
 {
     NellyMoserEncodeContext *s = avctx->priv_data;
-    int16_t *samples = data;
+    const int16_t *samples = data;
     int i;
 
     if (s->last_frame)
@@ -392,4 +392,5 @@ AVCodec nellymoser_encoder = {
     .close = encode_end,
     .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
     .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
 };