summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2015-11-19 14:10:40 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2015-11-19 14:10:40 +0000
commit218f46fc99dd88664af8d759de07023d6af01e90 (patch)
tree65d2c5d3e305a92c5412dbe33e0dde2566d4df0c
parent8f63355f8f387b3db67b18004ef9a5befc99e8cb (diff)
parent303f931938c618668f7f83c646a1850bef84641e (diff)
downloadffmpeg-streaming-218f46fc99dd88664af8d759de07023d6af01e90.zip
ffmpeg-streaming-218f46fc99dd88664af8d759de07023d6af01e90.tar.gz
Merge commit '303f931938c618668f7f83c646a1850bef84641e'
* commit '303f931938c618668f7f83c646a1850bef84641e': mov: Correctly store dref paths Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r--libavformat/mov.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0eb7272..b99cf73 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -574,7 +574,7 @@ 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 || type == 18) { // absolute path
+ if (type == 2) { // absolute path
av_free(dref->path);
dref->path = av_mallocz(len+1);
if (!dref->path)
@@ -585,15 +585,13 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_freep(&dref->path);
return ret;
}
- 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);
dref->path[len] = 0;
}
for (j = 0; j < len; j++)
- if (dref->path[j] == ':')
+ if (dref->path[j] == ':' || dref->path[j] == 0)
dref->path[j] = '/';
av_log(c->fc, AV_LOG_DEBUG, "path %s\n", dref->path);
} else if (type == 0) { // directory name
OpenPOWER on IntegriCloud