Ok, but how? Could you give me an example?

Regards
Dominik

On Tue, Aug 10, 2010 at 4:44 PM, Luca Abeni <[email protected]> wrote:

> On 10/08/10 14:49, Dominik Tomczak wrote:
> [...]
>
>  int64_t now = av_gettime();
>> const AVRational codecTimebase =
>> avCodecCtx->getVideoCodecContext()->time_base;
>> const AVRational streamTimebase = avCodecCtx->getVideoStream()->time_base;
>> int64_t rescaledNow = av_rescale_q( now, codecTimebase, streamTimebase );
>> dstFrame->pts = rescaledNow;
>>
> Here, you are converting "now" from the codec timebase to the stream
> timebase. Which looks wrong, since "now" is expressed in usecs, not in the
> codec timebase. And you should probably convert to the codec timebase, not
> to the stream timebase.
>
>
>                                Luca
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>



-- 
Dominik Tomczak
Software Engineer
www.dominiktomczak.com
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to