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