mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d15a94ba20
commit
0c6c5d7bcb
|
@ -78,7 +78,7 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
|
||||||
|
|
||||||
void ff_mjpeg_encode_close(MpegEncContext *s)
|
void ff_mjpeg_encode_close(MpegEncContext *s)
|
||||||
{
|
{
|
||||||
av_free(s->mjpeg_ctx);
|
av_freep(&s->mjpeg_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void encode_block(MpegEncContext *s, int16_t *block, int n)
|
static void encode_block(MpegEncContext *s, int16_t *block, int n)
|
||||||
|
|
Loading…
Reference in New Issue