mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/lrcdec: Fix memleak upon read header failure
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit d38694cea9f289b3f9dcce1a2f07746d029b35f3) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
bde71f0c9b
commit
9b021e24f7
@ -202,6 +202,7 @@ static int lrc_read_header(AVFormatContext *s)
|
||||
sub = ff_subtitles_queue_insert(&lrc->q, line.str + ts_strlength,
|
||||
line.len - ts_strlength, 0);
|
||||
if(!sub) {
|
||||
ff_subtitles_queue_clean(&lrc->q);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
sub->pos = pos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user