mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avformat/mov: Don't add attached pic if one is already present
Fixes: memleak Fixes: 67714/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5671570999476224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -8820,7 +8820,7 @@ static void mov_read_chapters(AVFormatContext *s)
|
||||
|
||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
st->disposition |= AV_DISPOSITION_ATTACHED_PIC | AV_DISPOSITION_TIMED_THUMBNAILS;
|
||||
if (sti->nb_index_entries) {
|
||||
if (!st->attached_pic.data && sti->nb_index_entries) {
|
||||
// Retrieve the first frame, if possible
|
||||
AVIndexEntry *sample = &sti->index_entries[0];
|
||||
if (avio_seek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
|
||||
|
||||
Reference in New Issue
Block a user