mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02: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
@ -63,10 +63,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
s->pictures[0] = av_frame_alloc();
|
s->pictures[0] = av_frame_alloc();
|
||||||
s->pictures[1] = av_frame_alloc();
|
s->pictures[1] = av_frame_alloc();
|
||||||
if (!s->pictures[0] || !s->pictures[1]) {
|
if (!s->pictures[0] || !s->pictures[1])
|
||||||
decode_end(avctx);
|
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -269,5 +267,5 @@ AVCodec ff_c93_decoder = {
|
|||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.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…
Reference in New Issue
Block a user