projects
/
libav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mov: Trim dref absolute path
[libav.git]
/
libavformat
/
mov.c
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
0dee5ec
..
a556aa7
100644
(file)
--- a/
libavformat/mov.c
+++ b/
libavformat/mov.c
@@
-554,6
+554,13
@@
static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
memmove(dref->path, dref->path+volume_len, len);
dref->path[len] = 0;
}
memmove(dref->path, dref->path+volume_len, len);
dref->path[len] = 0;
}
+ // trim string of any ending zeros
+ for (j = len - 1; j >= 0; j--) {
+ if (dref->path[j] == 0)
+ len--;
+ else
+ break;
+ }
for (j = 0; j < len; j++)
if (dref->path[j] == ':' || dref->path[j] == 0)
dref->path[j] = '/';
for (j = 0; j < len; j++)
if (dref->path[j] == ':' || dref->path[j] == 0)
dref->path[j] = '/';