summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-04-07 15:06:04 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-04-19 22:48:14 +0100
commit376589e5dd72aa2dd42500f456fca303fcdcad85 (patch)
tree579d24aaed4618242eb8652ed8b2f46eceaad2e4 /libavformat/mov.c
parent22526c1f557a72b3285d295bd8b30c40eb65d437 (diff)
mov: Read alternate absolute path in dref alis
Absolute paths can be stored in alis type 2 and 18 according to my research: the first is the canonical MacOS filepath, with path level separated by colons, and the volume name within the filepath, while the second should be the absolute filesystem path from the mount point.
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 98822af711..2704dfb35e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -518,12 +518,14 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
if (len&1)
len += 1;
- if (type == 2) { // absolute path
+ if (type == 2 || type == 18) { // absolute path
av_free(dref->path);
dref->path = av_mallocz(len+1);
if (!dref->path)
return AVERROR(ENOMEM);
avio_read(pb, dref->path, len);
+ if (type == 18) // no additional processing needed
+ continue;
if (len > volume_len && !strncmp(dref->path, dref->volume, volume_len)) {
len -= volume_len;
memmove(dref->path, dref->path+volume_len, len);