Shouting and waving people were in the bus station.
I think this should be the correct one, but I noticed that some people say this.
People shouting and waving were in the bus station.
Which one is correct? If both are correct, is there any grammatical rule that enable us to say both of them?