mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
truemotion1: fix leaking frame on init failure
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
845bb40178
commit
46e75617d9
@ -489,8 +489,10 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx)
|
||||
/* there is a vertical predictor for each pixel in a line; each vertical
|
||||
* predictor is 0 to start with */
|
||||
av_fast_malloc(&s->vert_pred, &s->vert_pred_size, s->avctx->width * sizeof(unsigned int));
|
||||
if (!s->vert_pred)
|
||||
if (!s->vert_pred) {
|
||||
av_frame_free(&s->frame);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user