[FFmpeg-devel] [PATCH] stream copy packet duration
Wed Jul 25 18:08:45 CEST 2007
On Wed, 25 Jul 2007 17:58:18 +0200
Baptiste Coudurier <baptiste.coudurier at smartjog.com> wrote:
> 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,
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 700 bytes
Desc: not available
More information about the ffmpeg-devel