summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2015-11-19 14:11:45 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2015-11-19 14:11:45 +0000
commitf7c3ec3a01e4947397e6860bfbd8a91b040bd0b8 (patch)
treef7f3902b41e54b21e1a5e86952f317ed0333741c
parent218f46fc99dd88664af8d759de07023d6af01e90 (diff)
parentb5f963bfec1f452c37eee900c7b11f065d10dd60 (diff)
downloadffmpeg-f7c3ec3a01e4947397e6860bfbd8a91b040bd0b8.tar.gz
Merge commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60'
* commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60': mov: Drop dref when unable to parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r--libavformat/mov.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b99cf731f3..8493de954c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -518,7 +518,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return AVERROR(ENOMEM);
sc->drefs_count = entries;
- for (i = 0; i < sc->drefs_count; i++) {
+ for (i = 0; i < entries; i++) {
MOVDref *dref = &sc->drefs[i];
uint32_t size = avio_rb32(pb);
int64_t next = avio_tell(pb) + size - 4;
@@ -613,6 +613,11 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
} else
avio_skip(pb, len);
}
+ } else {
+ av_log(c->fc, AV_LOG_DEBUG, "Unknown dref type 0x08%x size %d\n",
+ dref->type, size);
+ entries--;
+ i--;
}
avio_seek(pb, next, SEEK_SET);
}