libavformat/lafdec: free data

Fixes: memleak

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-01-30 23:18:49 +01:00
parent ad95d9c855
commit f4b4e16641
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 11 additions and 0 deletions

View File

@ -252,6 +252,15 @@ again:
return 0;
}
static int laf_read_close(AVFormatContext *ctx)
{
LAFContext *s = ctx->priv_data;
av_freep(&s->data);
return 0;
}
static int laf_read_seek(AVFormatContext *ctx, int stream_index,
int64_t timestamp, int flags)
{
@ -269,7 +278,9 @@ const AVInputFormat ff_laf_demuxer = {
.read_probe = laf_probe,
.read_header = laf_read_header,
.read_packet = laf_read_packet,
.read_close = laf_read_close,
.read_seek = laf_read_seek,
.extensions = "laf",
.flags = AVFMT_GENERIC_INDEX,
.flags_internal = FF_FMT_INIT_CLEANUP,
};