Decode H264/H265 color frame byte data and sync with depth frame

For femto mega with Ethernet connection and 3840 * 2160 resolution, the color stream format can only be H264/H265. In the “” example, what is the “byte_data” from a color frame, does it always represent a full frame (I frame)?
In H264, there are I/P/B frames, looks like the we need buffering for decoding, how does the following example code achieve the decoding with just 1 color frame data?

cmd_in = [
        '-f', color_format,
        '-i', 'pipe:',
        '-f', 'rawvideo',
        '-pix_fmt', 'bgr24',

    byte_data = color_frame.get_data().tobytes()

    proc = subprocess.Popen(cmd_in, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    out, err = proc.communicate(input=byte_data)

And since the color frame is decoded separately, how can it be synchronized with depth frame?