early-access version 1680
This commit is contained in:
9
externals/ffmpeg/libavcodec/apedec.c
vendored
9
externals/ffmpeg/libavcodec/apedec.c
vendored
@@ -262,9 +262,8 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
for (i = 0; i < APE_FILTER_LEVELS; i++) {
|
||||
if (!ape_filter_orders[s->fset][i])
|
||||
break;
|
||||
FF_ALLOC_OR_GOTO(avctx, s->filterbuf[i],
|
||||
(ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4,
|
||||
filter_alloc_fail);
|
||||
if (!(s->filterbuf[i] = av_malloc((ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4)))
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
if (s->fileversion < 3860) {
|
||||
@@ -300,9 +299,6 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
|
||||
return 0;
|
||||
filter_alloc_fail:
|
||||
ape_decode_close(avctx);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1638,6 +1634,7 @@ AVCodec ff_ape_decoder = {
|
||||
.decode = ape_decode_frame,
|
||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
|
||||
AV_CODEC_CAP_DR1,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||
.flush = ape_flush,
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||
AV_SAMPLE_FMT_S16P,
|
||||
|
Reference in New Issue
Block a user