[Libav-user] QSV waits until next frame before decoding, how to make decode immediately?
TL;DR h264_qsv is waiting until the next frame before decoding--how do I make it decode immediately?
I recently implemented h264_qsv decode after following this example. The problem I'm having is that I'm experiencing some latency when playing back frames, and I believe I have figured out why. According to this post, Intel QSV SDK will wait until the next frame is received before starting the decode process, because it's not sure if the frame is a full frame or not. The answer says that the solution is to pass in a MFX_BITSTREAM_COMPLETE_FRAME parameter, to set AsyncDepth = 1, and to set SEI.pic_timing.dpb_output_delay.
Does anyone know how to use these settings in Libavcodec/how to resolve the frame delay decoding issue? I thought maybe they would be passed into the AVHwFramesContext struct but I can't find them anywhere.