|
|
@ -324,6 +324,8 @@ static int sbc_decode_init(AVCodecContext *avctx) |
|
|
|
SBCDecContext *sbc = avctx->priv_data; |
|
|
|
SBCDecContext *sbc = avctx->priv_data; |
|
|
|
int i, ch; |
|
|
|
int i, ch; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16P; |
|
|
|
|
|
|
|
|
|
|
|
sbc->frame.crc_ctx = av_crc_get_table(AV_CRC_8_EBU); |
|
|
|
sbc->frame.crc_ctx = av_crc_get_table(AV_CRC_8_EBU); |
|
|
|
|
|
|
|
|
|
|
|
memset(sbc->dsp.V, 0, sizeof(sbc->dsp.V)); |
|
|
|
memset(sbc->dsp.V, 0, sizeof(sbc->dsp.V)); |
|
|
@ -348,9 +350,8 @@ static int sbc_decode_frame(AVCodecContext *avctx, |
|
|
|
if (frame_length <= 0) |
|
|
|
if (frame_length <= 0) |
|
|
|
return frame_length; |
|
|
|
return frame_length; |
|
|
|
|
|
|
|
|
|
|
|
avctx->channels = |
|
|
|
avctx->channels = sbc->frame.channels; |
|
|
|
frame->channels = sbc->frame.channels; |
|
|
|
|
|
|
|
frame->format = AV_SAMPLE_FMT_S16P; |
|
|
|
|
|
|
|
frame->nb_samples = sbc->frame.blocks * sbc->frame.subbands; |
|
|
|
frame->nb_samples = sbc->frame.blocks * sbc->frame.subbands; |
|
|
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) |
|
|
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|