[FFmpeg-cvslog] r12241 - trunk/libavformat/mov.c

Michael Niedermayer michaelni
Wed Feb 27 00:34:49 CET 2008


On Tue, Feb 26, 2008 at 07:21:58PM +0100, bcoudurier wrote:
> Author: bcoudurier
> Date: Tue Feb 26 19:21:58 2008
> New Revision: 12241
> 
> Log:
> support mov reference files, ref.mov/ref.m2v/ref.wav and detect BrianCox.mov
[...]
> +            for (type = 0; type != -1 && url_ftell(pb) < next; ) {
> +                type = get_be16(pb);
> +                len = get_be16(pb);
> +                av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
> +                if (len&1)
> +                    len += 1;
> +                if (type == 2) { // absolute path
> +                    dref->path = av_mallocz(len+1);
> +                    get_buffer(pb, dref->path, len);
> +                    if (!strncmp(dref->path, 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] == ':')
> +                            dref->path[j] = '/';
> +                    av_log(c->fc, AV_LOG_DEBUG, "path %s\n", dref->path);
> +                } else
> +                    url_fskip(pb, len);
> +            }

Also you forgot an av_free() (for the case that there are multiple type=2)


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080227/25166ba9/attachment.pgp>



More information about the ffmpeg-cvslog mailing list