Encoder encode a video (IDR P P P ...) and send to decoder and display it in real time, and I noticed encoder send i th frame but decoder display i-1 th frame.
I know p frame need to be removed from ref list so it can be removed from decode picture buffer, but it would cause next p frame decode fails.
Is there way to fix one frame delay?
Becase one frame delay is about 33 ms latency as 30fps, which is unacceptable.
When you use 30 fps, the time budget for each frame, be it I or be it P, is 33ms. To encode, transmit, and decode a frame cannot possibly take less than 33ms. It probably takes more than that, even twice that.
If you need less latency, increase the frame rate.