You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/cfhdenc: free alpha buffer on closing
This commit is contained in:
@@ -356,6 +356,9 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
|
|||||||
s->lut[i] = last;
|
s->lut[i] = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->planes != 4)
|
||||||
|
return 0;
|
||||||
|
|
||||||
s->alpha = av_calloc(avctx->width * avctx->height, sizeof(*s->alpha));
|
s->alpha = av_calloc(avctx->width * avctx->height, sizeof(*s->alpha));
|
||||||
if (!s->alpha)
|
if (!s->alpha)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
@@ -864,6 +867,8 @@ static av_cold int cfhd_encode_close(AVCodecContext *avctx)
|
|||||||
s->plane[i].l_h[j] = NULL;
|
s->plane[i].l_h[j] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
av_freep(&s->alpha);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user