]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g722dec.c
avfilter: Remove deprecated resample_lavr_opts
[ffmpeg] / libavcodec / g722dec.c
index 000b591fe62428ac059f214eedec04d22bdd9a1f..8444d9a4bc9b04039a44a5576b82ca26d0a6868b 100644 (file)
@@ -100,7 +100,9 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data,
         return ret;
     out_buf = (int16_t *)frame->data[0];
 
-    init_get_bits(&gb, avpkt->data, avpkt->size * 8);
+    ret = init_get_bits8(&gb, avpkt->data, avpkt->size);
+    if (ret < 0)
+        return ret;
 
     for (j = 0; j < avpkt->size; j++) {
         int ilow, ihigh, rlow, rhigh, dhigh;
@@ -145,6 +147,6 @@ AVCodec ff_adpcm_g722_decoder = {
     .priv_data_size = sizeof(G722Context),
     .init           = g722_decode_init,
     .decode         = g722_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_class     = &g722_decoder_class,
 };