In webrtc, the reference frame for non-keyframe is 1:
frame->num_references = frame->frame_type() == kVideoFrameKey ? 0 : 1;
But for h264, the reference frames can be at most 16? Why it is 1 in webrtc?
I suppose you look on this rtp code https://webrtc.googlesource.com/src/webrtc/+/f54860e9ef0b68e182a01edc994626d21961bc4b/modules/video_coding/rtp_frame_reference_finder.cc
Take a look on other occurrences of frame->num_references
in the file and you will see that it is not always 0 or 1.