mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-13 10:10:03 +00:00
avformat/oggparsevorbis: free base64 encoded data immediately after decoding it
It has no use afterwards and freeing it before calling ff_flac_parse_picture() may help prevent OOM issues on memory constrained scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
8b5b756c4d
commit
afd04058bc
@ -161,10 +161,11 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
|
|||||||
av_freep(&ct);
|
av_freep(&ct);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((ret = av_base64_decode(pict, ct, len)) > 0)
|
ret = av_base64_decode(pict, ct, len);
|
||||||
ret = ff_flac_parse_picture(as, pict, ret);
|
|
||||||
av_freep(&tt);
|
av_freep(&tt);
|
||||||
av_freep(&ct);
|
av_freep(&ct);
|
||||||
|
if (ret > 0)
|
||||||
|
ret = ff_flac_parse_picture(as, pict, ret);
|
||||||
av_freep(&pict);
|
av_freep(&pict);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
|
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user