mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/escape124: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1c5647f419
commit
f0d1b3acdf
@ -76,7 +76,7 @@ static av_cold int escape124_decode_close(AVCodecContext *avctx)
|
|||||||
Escape124Context *s = avctx->priv_data;
|
Escape124Context *s = avctx->priv_data;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
av_free(s->codebooks[i].blocks);
|
av_freep(&s->codebooks[i].blocks);
|
||||||
|
|
||||||
av_frame_free(&s->frame);
|
av_frame_free(&s->frame);
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
|
|||||||
cb_size = s->num_superblocks << cb_depth;
|
cb_size = s->num_superblocks << cb_depth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
av_free(s->codebooks[i].blocks);
|
av_freep(&s->codebooks[i].blocks);
|
||||||
s->codebooks[i] = unpack_codebook(&gb, cb_depth, cb_size);
|
s->codebooks[i] = unpack_codebook(&gb, cb_depth, cb_size);
|
||||||
if (!s->codebooks[i].blocks)
|
if (!s->codebooks[i].blocks)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user