mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avcodec/c93: Cleanup generically after init failure
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
142ae27b1d
commit
8de4a132ff
1 changed files with 2 additions and 4 deletions
|
|
@ -63,10 +63,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||
|
||||
s->pictures[0] = av_frame_alloc();
|
||||
s->pictures[1] = av_frame_alloc();
|
||||
if (!s->pictures[0] || !s->pictures[1]) {
|
||||
decode_end(avctx);
|
||||
if (!s->pictures[0] || !s->pictures[1])
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -269,5 +267,5 @@ AVCodec ff_c93_decoder = {
|
|||
.close = decode_end,
|
||||
.decode = decode_frame,
|
||||
.capabilities = AV_CODEC_CAP_DR1,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue