[FFmpeg-devel] [PATCH] Add a time_base field to AVFilterPad.

Michael Niedermayer michaelni
Wed Oct 6 12:13:42 CEST 2010


On Wed, Oct 06, 2010 at 10:57:47AM +0200, Stefano Sabatini wrote:
> On date Wednesday 2010-10-06 02:44:51 +0200, Michael Niedermayer encoded:
> > On Wed, Oct 06, 2010 at 02:00:53AM +0200, Stefano Sabatini wrote:
> > > On date Tuesday 2010-10-05 13:48:41 +0200, Michael Niedermayer encoded:
> > > > On Tue, Oct 05, 2010 at 11:16:51AM +0200, Stefano Sabatini wrote:
> > > > > On date Monday 2010-10-04 00:12:15 +0200, Michael Niedermayer encoded:
> > > > > > On Sun, Oct 03, 2010 at 11:23:49PM +0200, Stefano Sabatini wrote:
> > > > > > > On date Sunday 2010-10-03 21:07:55 +0200, Michael Niedermayer encoded:
> > > > > [...]
> > > > > > > static int config_output(AVFilterLink *outlink)
> > > > > > > {
> > > > > > >     AVFilterContext *ctx = outlink->src;
> > > > > > > 
> > > > > > >     /* choose the output timebase */
> > > > > > >     AVRational tb1 = ctx->input_pads[MAIN   ].time_base;
> > > > > > >     AVRational tb2 = ctx->input_pads[OVERLAY].time_base;
> > > > > > >     AVRational tb;
> > > > > > >     int exact = 1;
> > > > > > > 
> > > > > > >     exact *= av_reduce(&tb1.num, &tb1.den, tb1.num, tb1.den, INT32_MAX);
> > > > > > >     exact *= av_reduce(&tb2.num, &tb2.den, tb2.num, tb2.den, INT32_MAX);
> > > > > > >     exact *= av_reduce(&tb.num, &tb.den,
> > > > > > >                        (int64_t)tb1.num * tb2.num, (int64_t)tb1.den * tb2.den, INT_MAX);
> > > > > > 
> > > > > > your code makes no sense
> > > > > > with a/b and c/d
> > > > > > 
> > > > > > you need something like:

> > > > > > reduce(gcd(ad,cb)/bd)
[...]
> Reducing tb1 and tb2 should solve the issue in this case.

why dont you use what i suggest?

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

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101006/c2ebd18f/attachment.pgp>



More information about the ffmpeg-devel mailing list