[FFmpeg-devel] [PATCH] stream copy packet duration
Aurelien Jacobs
aurel
Wed Jul 25 21:37:03 CEST 2007
On Wed, 25 Jul 2007 20:09:13 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
>
> On Wed, Jul 25, 2007 at 06:08:45PM +0200, Aurelien Jacobs wrote:
> > On Wed, 25 Jul 2007 17:58:18 +0200
> > Baptiste Coudurier <baptiste.coudurier at smartjog.com> wrote:
> >
> > > Hi
> > >
> > > Aurelien Jacobs wrote:
> > > > Hi,
> > > >
> > > > Attached patch allows to copy packet duration when doing a stream copy.
> > > > This will be especially useful when stream copying subtitles.
> > > > Ok to apply ?
> > > >
> > > > [...]
> > > >
> > > > + opkt.duration = av_rescale_q(av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q), AV_TIME_BASE_Q, ost->st->time_base);
> > > >
> > >
> > > Why not :
> > >
> > > opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base,
> > > ost->st->time_base);
> >
> > In fact I copied the way it's done for pts rescaling. But now that I think
> > about it, it was done this way because an offset is added to the pts.
> > And this offset must be relative to AV_TIME_BASE_Q.
> > So for duration, your proposition should be fine.
> > Updated patch attached.
>
> looks ok
Applied.
Aurel
More information about the ffmpeg-devel
mailing list