]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/adxdec.c
Fix lossless jpeg encoder to comply to spec and store full redundant
[ffmpeg] / libavcodec / adxdec.c
index cc7ca5ffcf48eb5c016823ccbf93970a43f52951..5512d7fc562d552a15f311fc62166b10793fe2d2 100644 (file)
  * adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/
  */
 
+static av_cold int adx_decode_init(AVCodecContext *avctx)
+{
+    avctx->sample_fmt = SAMPLE_FMT_S16;
+    return 0;
+}
+
 /* 18 bytes <-> 32 samples */
 
 static void adx_decode(short *out,const unsigned char *in,PREV *prev)
@@ -96,7 +102,7 @@ static int adx_decode_header(AVCodecContext *avctx,const unsigned char *buf,size
 
 static int adx_decode_frame(AVCodecContext *avctx,
                 void *data, int *data_size,
-                uint8_t *buf0, int buf_size)
+                const uint8_t *buf0, int buf_size)
 {
     ADXContext *c = avctx->priv_data;
     short *samples = data;
@@ -161,9 +167,10 @@ AVCodec adpcm_adx_decoder = {
     CODEC_TYPE_AUDIO,
     CODEC_ID_ADPCM_ADX,
     sizeof(ADXContext),
-    NULL,
+    adx_decode_init,
     NULL,
     NULL,
     adx_decode_frame,
+    .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX"),
 };