mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
vcmi: fix build and run with ffmpeg 6.0
This commit is contained in:
parent
010c548dc1
commit
a72af34d9f
@ -364,7 +364,12 @@ void CVideoPlayer::update( int x, int y, SDL_Surface *dst, bool forceRedraw, boo
|
|||||||
if (sws == nullptr)
|
if (sws == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double frameEndTime = (frame->pts + frame->pkt_duration) * av_q2d(format->streams[stream]->time_base);
|
#if (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||||
|
auto packet_duration = frame->pkt_duration;
|
||||||
|
#else
|
||||||
|
auto packet_duration = frame->duration;
|
||||||
|
#endif
|
||||||
|
double frameEndTime = (frame->pts + packet_duration) * av_q2d(format->streams[stream]->time_base);
|
||||||
frameTime += GH.mainFPSmng->getElapsedMilliseconds() / 1000.0;
|
frameTime += GH.mainFPSmng->getElapsedMilliseconds() / 1000.0;
|
||||||
|
|
||||||
if (frameTime >= frameEndTime )
|
if (frameTime >= frameEndTime )
|
||||||
|
Loading…
Reference in New Issue
Block a user