The film set in Rio you are thinking about is 'Pixote'.  A vey sad ending to that story in real life as the star of the film, I think he was about 12 when the film was made but I could be wrong, died before the age of 20 on the streets of metropolitan Brazil.