Re: [Libav-user] AVFrame pts and av_usleep funciton.

2023-08-21 Thread Paul B Mahol
On Mon, Aug 21, 2023 at 10:30 AM Denis Gottardello wrote: > > In order to implement a sleep function and wait the right time to display > a frame I have written this code: > > int framerate= pAVCodecContextVideo->framerate.num / > pAVCodecContextVideo->framerate.den; > > if (previous!= 0) { > >

Re: [Libav-user] AVFrame pts and av_usleep funciton.

2023-08-21 Thread Denis Gottardello
Thanks for you reply. So these lines of code: int64_t pts= av_rescale(pAVFrame->pts, pAVCodecContextVideo->framerate.den, pAVCodecContextVideo->framerate.num); printf("pts, %d\n", pts); Should print the timestamp (as time_t) of each frame? Is the pts value calculated correctly? In data lunedì

Re: [Libav-user] AVFrame pts and av_usleep funciton.

2023-08-30 Thread Richard Hussong
On Mon, Aug 21, 2023 at 5:48 AM Denis Gottardello wrote: > > Thanks for you reply. > > So these lines of code: > > int64_t pts= av_rescale(pAVFrame->pts, > pAVCodecContextVideo->framerate.den, pAVCodecContextVideo->framerate.num); > > printf("pts, %d\n", pts); > > Should print the timestamp (as t