Commit 82d9c4e5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '376589e5'

* commit '376589e5':
  mov: Read alternate absolute path in dref alis
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5a284d07 376589e5
...@@ -521,12 +521,14 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -521,12 +521,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); av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
if (len&1) if (len&1)
len += 1; len += 1;
if (type == 2) { // absolute path if (type == 2 || type == 18) { // absolute path
av_free(dref->path); av_free(dref->path);
dref->path = av_mallocz(len+1); dref->path = av_mallocz(len+1);
if (!dref->path) if (!dref->path)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
avio_read(pb, dref->path, len); 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)) { if (len > volume_len && !strncmp(dref->path, dref->volume, volume_len)) {
len -= volume_len; len -= volume_len;
memmove(dref->path, dref->path+volume_len, len); memmove(dref->path, dref->path+volume_len, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment