rtp: h264: Move profile_level_id parsing to a function