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;
return avpkt->size;
}
-AVCodec ff_adpcm_g722_decoder = {
+const AVCodec ff_adpcm_g722_decoder = {
.name = "g722",
.long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
.type = AVMEDIA_TYPE_AUDIO,
.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,
};