mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/mov: don't reallocate extradata when converting dvdsub palette
After introduction of ff_dvdclut_palette_extradata_cat() to convert
DVD subtitle palettes from YUV to RGB, a leak is introduced because
of the call to ff_alloc_extradata(). This is not necessary, instead
we should free the extradata because ff_bprint_to_codecpar_extradata()
will finalize the bprint'ed string to the codecpar and set the length.
Fixes leak introduced in 3b0e6c0ecc
.
Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
parent
b164dea68c
commit
8291aedf1a
@ -10602,9 +10602,8 @@ static int mov_read_header(AVFormatContext *s)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = ff_alloc_extradata(st->codecpar, FF_DVDCLUT_EXTRADATA_SIZE);
|
||||
if (err < 0)
|
||||
return err;
|
||||
av_freep(&st->codecpar->extradata);
|
||||
st->codecpar->extradata_size = 0;
|
||||
|
||||
err = ff_dvdclut_palette_extradata_cat(dvdsub_clut, FF_DVDCLUT_CLUT_SIZE,
|
||||
st->codecpar);
|
||||
|
Loading…
Reference in New Issue
Block a user