[FFmpeg-devel] [PATCH] Support for variable frame duration
Henrik Gulbrandsen
henrik
Sat Apr 26 17:09:18 CEST 2008
On Sat, 2008-04-26 at 14:06 +0200, Baptiste Coudurier wrote:
[...]
> > so it's not like there is a performance issue, and
> > the next_dts computation is where it is because that's where sample is
> > determined in the first place.
>
> But it's not at all where we need and use this information.
>
> > As far as I can see, there's no AVStream
> > reference in MOVStreamContext, so I would have to save st in order to
> > perform the computation outside the loop. Wouldn't this just introduce
> > an unneeded variable and make the code harder to read?
> >
>
> I don't think so, s->streams[sc->ffindex].
Thanks for that pointer! Something like this, then?
The patch is certainly more compact, although the number of things that
happen between the setting of sample and the new location would make me
slightly nervous as the reader of this code. For instance, it's easy to
miss that sc->current_sample++ in the middle.
Also, of course, this patch explicitly doesn't handle the ctts case.
There are some tricky border cases there that I can't easily test, so
that problem is left for somebody who actually needs the solution.
/Henrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: video_duration_mov_3.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080426/3f14e741/attachment.bin>
More information about the ffmpeg-devel
mailing list