It is possible to make delay equal to 2 frames using small level value and Baseline profile. And no threading, of course. GOP pattern like IPPPPPP should cause such a small delay.
Or if you are using umc decoder, linking h264_dec.lib,youcan try to modify the library code, like
1) in h264_dec => umc_h264_task_supplier.cpp
make sure the value of m_maxDecFrameBuffering=0
i.g, comment out line 921
// if (m_TrickModeSpeed != 1)
m_maxDecFrameBuffering = 0;
2) at line 2318 of umc_h264_task_supplier.cpp.
Add two lines as below.
// add two lines here
if (MINIMAL_DATA_SIZE >= pSource->GetDataSize())
return RunDecoding(dst, pSource, force);
and rebuild the h264_dec.lib