Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-13 18:21:00 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-13 18:21:12 +0300
commitfeb1f7abc5873e2be6143c94e423315b57a159ef (patch)
tree1ae8681c18ae32373368ae4c2c64700e2a6e78ba /libavformat
parente7ac968f60dddd24c681101d5b9351c53ebc42f6 (diff)
parentd40cb726d271b0284642a1ba159eb26a5c579f77 (diff)
Merge commit 'd40cb726d271b0284642a1ba159eb26a5c579f77'
* commit 'd40cb726d271b0284642a1ba159eb26a5c579f77': mov: Trim dref absolute path Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 06c15fba6d..73bff0929b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -597,6 +597,13 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
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] = '/';