[Ffmpeg-devel] Re: [PATCH] h264 muxing in mp4

Michael Niedermayer michaelni
Sat Mar 11 14:44:56 CET 2006


Hi

On Sat, Mar 11, 2006 at 10:27:34AM +0100, Erik Slagter wrote:
> On Fri, 2006-03-10 at 19:47 +0100, Baptiste COUDURIER wrote:
> > +    url_open_dyn_buf(&pb);
> > +    nal_start = avc_find_startcode(p, end);
> > +    while (nal_start < end) {
> > +        while(!*(nal_start++));
>           ^^^^^^^^^^^^^^^^^^^^^^^
> > +        nal_end = avc_find_startcode(nal_start, end);
> > +        put_be32(&pb, nal_end - nal_start);
> 
> Isn't this a bit dangerous?

IMHO no, nal_start < end should gurantee that there is a 00 00 01 there
so the while wont runaway

[...]

-- 
Michael





More information about the ffmpeg-devel mailing list