mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/aadec: Fix leak on error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 3ec3370dea
)
This commit is contained in:
parent
fe8ae68738
commit
a01cf1fe54
@ -229,9 +229,12 @@ static int aa_read_header(AVFormatContext *s)
|
||||
chapter_pos -= start + CHAPTER_HEADER_SIZE * chapter_idx;
|
||||
avio_skip(pb, 4 + chapter_size);
|
||||
if (!avpriv_new_chapter(s, chapter_idx, st->time_base,
|
||||
chapter_pos * TIMEPREC, (chapter_pos + chapter_size) * TIMEPREC, NULL))
|
||||
chapter_pos * TIMEPREC,
|
||||
(chapter_pos + chapter_size) * TIMEPREC, NULL)) {
|
||||
av_freep(&c->tea_ctx);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
|
||||
st->duration = (largest_size - CHAPTER_HEADER_SIZE * s->nb_chapters) * TIMEPREC;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user