Check if the data pointed to by buffer is a valid RTCP packet using rtcp_buffer_validate_data.
buffer