diff g726.c @ 7451:85ab7655ad4d libavcodec

Modify all codecs to report their supported input and output sample format(s).
author pross
date Thu, 31 Jul 2008 10:47:31 +0000
parents 6f70dc804076
children a570a1e80400
line wrap: on
line diff
--- a/g726.c	Wed Jul 30 18:21:51 2008 +0000
+++ b/g726.c	Thu Jul 31 10:47:31 2008 +0000
@@ -323,6 +323,9 @@
         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 @@
     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