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) {
>
>
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ì
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