Plumb presentation time from server into AVFrame.pts field

This commit is contained in:
Cameron Gutman
2019-11-11 18:03:47 -08:00
parent 741113a607
commit de7b973239
3 changed files with 6 additions and 3 deletions

View File

@@ -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