mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 23:35:55 +00:00
Plumb presentation time from server into AVFrame.pts field
This commit is contained in:
parent
741113a607
commit
de7b973239
@ -258,7 +258,7 @@ void Pacer::renderFrame(AVFrame* frame)
|
||||
{
|
||||
// Count time spent in Pacer's queues
|
||||
Uint32 beforeRender = SDL_GetTicks();
|
||||
m_VideoStats->totalPacerTime += beforeRender - frame->pts;
|
||||
m_VideoStats->totalPacerTime += beforeRender - frame->pkt_dts;
|
||||
|
||||
// Render it
|
||||
m_VsyncRenderer->renderFrame(frame);
|
||||
|
@ -731,8 +731,11 @@ int FFmpegVideoDecoder::submitDecodeUnit(PDECODE_UNIT du)
|
||||
// Restore default log level after a successful decode
|
||||
av_log_set_level(AV_LOG_INFO);
|
||||
|
||||
// Store the presentation time
|
||||
frame->pts = du->presentationTimeMs;
|
||||
|
||||
// Capture a frame timestamp to measuring pacing delay
|
||||
frame->pts = SDL_GetTicks();
|
||||
frame->pkt_dts = SDL_GetTicks();
|
||||
|
||||
// Count time in avcodec_send_packet() and avcodec_receive_frame()
|
||||
// as time spent decoding
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 49fd1bed3f40456e98a6ede60558a8ce1964327c
|
||||
Subproject commit f4dad9ae8bca90aada76c9bb858e4eea0fff5b76
|
Loading…
x
Reference in New Issue
Block a user